Fix email and calendar settings not displayed when only one channel is present

This commit is contained in:
Charles Bochet
2024-07-18 09:23:14 +02:00
parent efd932e99b
commit 62e9492e8b
2 changed files with 4 additions and 2 deletions

View File

@ -70,7 +70,8 @@ export const SettingsAccountsCalendarChannelsContainer = () => {
)}
{calendarChannels.map((calendarChannel) => (
<React.Fragment key={calendarChannel.id}>
{calendarChannel.id === activeTabId && (
{(calendarChannels.length === 1 ||
calendarChannel.id === activeTabId) && (
<SettingsAccountsCalendarChannelDetails
calendarChannel={calendarChannel}
/>

View File

@ -69,7 +69,8 @@ export const SettingsAccountsMessageChannelsContainer = () => {
)}
{messageChannels.map((messageChannel) => (
<React.Fragment key={messageChannel.id}>
{messageChannel.id === activeTabId && (
{(messageChannels.length === 1 ||
messageChannel.id === activeTabId) && (
<SettingsAccountsMessageChannelDetails
messageChannel={messageChannel}
/>