Skip to content

The open alternative to Salesforce, designed for AI.

Use settings icon in settings drawer tab (#22204)

Thomas des Francs34dc681c0ed9
diff --git a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerTabsRow.tsx b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerTabsRow.tsx
index a5f3d0c887c..7ccb82aefee 100644
--- a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerTabsRow.tsx
+++ b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerTabsRow.tsx
@@ -1,6 +1,11 @@
import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
-import { IconComment, IconHome, IconMessageCirclePlus } from 'twenty-ui/icon';
+import {
+ type IconComponent,
+ IconComment,
+ IconHome,
+ IconMessageCirclePlus,
+} from 'twenty-ui/icon';
import { OverflowingTextWithTooltip } from 'twenty-ui/surfaces';
import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';
import { useIsMobile } from 'twenty-ui/utilities';
@@ -128,7 +133,15 @@ const StyledNewChatButton = styled.div`
}
`;
-export const MainNavigationDrawerTabsRow = () => {
+type MainNavigationDrawerTabsRowProps = {
+ NavigationMenuTabIcon?: IconComponent;
+ navigationMenuTabLabel?: string;
+};
+
+export const MainNavigationDrawerTabsRow = ({
+ NavigationMenuTabIcon = IconHome,
+ navigationMenuTabLabel = t`Home`,
+}: MainNavigationDrawerTabsRowProps) => {
const { theme } = useContext(ThemeContext);
const isMobile = useIsMobile();
const isNavigationDrawerExpanded = useAtomStateValue(
@@ -191,7 +204,7 @@ export const MainNavigationDrawerTabsRow = () => {
navigationDrawerActiveTab ===
NAVIGATION_DRAWER_TABS.NAVIGATION_MENU
}
- aria-label={t`Home`}
+ aria-label={navigationMenuTabLabel}
tabIndex={
navigationDrawerActiveTab ===
NAVIGATION_DRAWER_TABS.NAVIGATION_MENU
@@ -202,7 +215,7 @@ export const MainNavigationDrawerTabsRow = () => {
onKeyDown={handleTabKeyDown(NAVIGATION_DRAWER_TABS.NAVIGATION_MENU)}
>
<StyledTabIcon>
- <IconHome
+ <NavigationMenuTabIcon
size={theme.icon.size.md}
color={getTabIconColor(
navigationDrawerActiveTab ===
diff --git a/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawer.tsx b/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawer.tsx
index 1b91f60aed7..4a41b705cba 100644
--- a/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawer.tsx
+++ b/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawer.tsx
@@ -16,6 +16,7 @@ import { styled } from '@linaria/react';
import { useLingui } from '@lingui/react/macro';
import { useIsMobile } from 'twenty-ui/utilities';
import { AdvancedSettingsToggle } from 'twenty-ui/input';
+import { IconSettings } from 'twenty-ui/icon';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import { PermissionFlagType } from '~/generated-metadata/graphql';
@@ -55,7 +56,10 @@ export const SettingsNavigationDrawer = ({
<NavigationDrawer className={className} title={t`Settings`}>
{hasAiPermission && (
<NavigationDrawerFixedContent>
- <MainNavigationDrawerTabsRow />
+ <MainNavigationDrawerTabsRow
+ NavigationMenuTabIcon={IconSettings}
+ navigationMenuTabLabel={t`Settings`}
+ />
</NavigationDrawerFixedContent>
)}