diff --git a/app/src/components/navigation/UserMenu.tsx b/app/src/components/navigation/UserMenu.tsx index 7abc889..b89f703 100644 --- a/app/src/components/navigation/UserMenu.tsx +++ b/app/src/components/navigation/UserMenu.tsx @@ -17,6 +17,7 @@ import { import { useAuth } from '../../contexts/AuthContext'; import AccountSettings from '../settings/account/AccountSettings'; import AdminDashboard from '../settings/admin/AdminDashboard'; +import { UserRole } from '@/types/models'; const UserMenu: React.FC = () => { const [accountSettingsOpened, setAccountSettingsOpened] = @@ -90,7 +91,7 @@ const UserMenu: React.FC = () => { - {user?.role === 'admin' && ( + {user?.role === UserRole.Admin && ( { setAdminDashboardOpened(true); @@ -116,7 +117,7 @@ const UserMenu: React.FC = () => { )} void handleLogout} px="sm" py="xs" color="red" diff --git a/app/src/components/navigation/WorkspaceSwitcher.tsx b/app/src/components/navigation/WorkspaceSwitcher.tsx index 82c1172..41f6fc7 100644 --- a/app/src/components/navigation/WorkspaceSwitcher.tsx +++ b/app/src/components/navigation/WorkspaceSwitcher.tsx @@ -50,7 +50,7 @@ const WorkspaceSwitcher: React.FC = () => { newWorkspace: Workspace ): Promise => { await loadWorkspaces(); - switchWorkspace(newWorkspace.name); + await switchWorkspace(newWorkspace.name); }; return ( @@ -67,7 +67,7 @@ const WorkspaceSwitcher: React.FC = () => { onClick={() => { setPopoverOpened((o) => !o); if (!popoverOpened) { - loadWorkspaces(); + void loadWorkspaces(); } }} > @@ -128,7 +128,7 @@ const WorkspaceSwitcher: React.FC = () => { { - switchWorkspace(workspace.name); + void switchWorkspace(workspace.name); setPopoverOpened(false); }} >