From 2c5e3dba60810a1bbf2fc4c122f20e0914970fc7 Mon Sep 17 00:00:00 2001 From: Weiko Date: Fri, 21 Mar 2025 16:26:06 +0100 Subject: [PATCH] revert logout button to settings menu (#11097) ## Context Reverting back the removal of "Log out" button. While it is now accessible from the workspace picker, suspended workspaces don't have access to that picker and are locked in the settings pages so I'm adding back the log out button in the settings menu Screenshot 2025-03-21 at 15 52 40 --- .../components/SettingsNavigationDrawerItems.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx b/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx index 599096881..af2578f33 100644 --- a/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx +++ b/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx @@ -1,3 +1,4 @@ +import { useAuth } from '@/auth/hooks/useAuth'; import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper'; import { SettingsNavigationDrawerItem } from '@/settings/components/SettingsNavigationDrawerItem'; import { @@ -5,14 +6,20 @@ import { SettingsNavigationSection, useSettingsNavigationItems, } from '@/settings/hooks/useSettingsNavigationItems'; +import { NavigationDrawerItem } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerItem'; import { NavigationDrawerItemGroup } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerItemGroup'; import { NavigationDrawerSection } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerSection'; import { NavigationDrawerSectionTitle } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitle'; import { getNavigationSubItemLeftAdornment } from '@/ui/navigation/navigation-drawer/utils/getNavigationSubItemLeftAdornment'; +import { useLingui } from '@lingui/react/macro'; import { matchPath, resolvePath, useLocation } from 'react-router-dom'; +import { IconDoorEnter } from 'twenty-ui'; import { getSettingsPath } from '~/utils/navigation/getSettingsPath'; export const SettingsNavigationDrawerItems = () => { + const { signOut } = useAuth(); + const { t } = useLingui(); + const settingsNavigationItems: SettingsNavigationSection[] = useSettingsNavigationItems(); @@ -109,6 +116,13 @@ export const SettingsNavigationDrawerItems = () => { ); })} + + + ); };