Fix dashboard crash when no channels exist (#1311)
* channel value test fix * update snapshots * Fix dashboard crashing when no channels exist (#1305) * add optional chaining to ids * lint fix * channel value test fix * Fix dashboard crashing when no channels exist (#1305) * add optional chaining to ids * lint fix * channel value test fix
This commit is contained in:
parent
12e4ff35ca
commit
c5adcda1e3
1 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
|
||||||
{isPickerActive && (
|
{isPickerActive && (
|
||||||
<AppChannelSelect
|
<AppChannelSelect
|
||||||
channels={availableChannels}
|
channels={availableChannels}
|
||||||
selectedChannelId={channel.id}
|
selectedChannelId={channel?.id}
|
||||||
onChannelSelect={setChannel}
|
onChannelSelect={setChannel}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -207,7 +207,7 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
|
||||||
user={user}
|
user={user}
|
||||||
onLogout={logout}
|
onLogout={logout}
|
||||||
onProfileClick={() =>
|
onProfileClick={() =>
|
||||||
navigate(staffMemberDetailsUrl(user.id))
|
navigate(staffMemberDetailsUrl(user?.id))
|
||||||
}
|
}
|
||||||
onThemeToggle={toggleTheme}
|
onThemeToggle={toggleTheme}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue