fix: improve settings menu spacing by moving logout into last section (#11202)
Issue: https://github.com/twentyhq/twenty/issues/11194 - Remove separate navigation drawer section for logout button - Move logout button into the last section of settings menu - Fix visual spacing between menu items --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -6,6 +6,7 @@ import {
|
||||
IconColorSwatch,
|
||||
IconComponent,
|
||||
IconCurrencyDollar,
|
||||
IconDoorEnter,
|
||||
IconFlask,
|
||||
IconFunction,
|
||||
IconHierarchy2,
|
||||
@ -22,6 +23,7 @@ import {
|
||||
|
||||
import { SettingsPath } from '@/types/SettingsPath';
|
||||
|
||||
import { useAuth } from '@/auth/hooks/useAuth';
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { billingState } from '@/client-config/states/billingState';
|
||||
import { labPublicFeatureFlagsState } from '@/client-config/states/labPublicFeatureFlagsState';
|
||||
@ -52,6 +54,7 @@ export type SettingsNavigationItem = {
|
||||
|
||||
const useSettingsNavigationItems = (): SettingsNavigationSection[] => {
|
||||
const billing = useRecoilValue(billingState);
|
||||
const { signOut } = useAuth();
|
||||
|
||||
const isFunctionSettingsEnabled = false;
|
||||
const isBillingEnabled = billing?.isBillingEnabled ?? false;
|
||||
@ -197,6 +200,11 @@ const useSettingsNavigationItems = (): SettingsNavigationSection[] => {
|
||||
path: SettingsPath.Releases,
|
||||
Icon: IconRocket,
|
||||
},
|
||||
{
|
||||
label: t`Logout`,
|
||||
onClick: signOut,
|
||||
Icon: IconDoorEnter,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user