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:
João Benedet
2025-03-26 18:10:12 -03:00
committed by GitHub
parent 4c7d71e325
commit 6f7e6e63f8
2 changed files with 8 additions and 11 deletions

View File

@ -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,
},
],
},
];