Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesBochet committed Dec 18, 2024
1 parent 96e072e commit e7c5bbd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ import {
NavigationDrawerProps,
} from '@/ui/navigation/navigation-drawer/components/NavigationDrawer';
import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { getImageAbsoluteURI } from 'twenty-shared';
import { REACT_APP_SERVER_BASE_URL } from '~/config';

import { useIsSettingsDrawer } from '@/navigation/hooks/useIsSettingsDrawer';

import { MainNavigationDrawerItems } from '@/navigation/components/MainNavigationDrawerItems';
import { isNonEmptyString } from '@sniptt/guards';
import { AdvancedSettingsToggle } from 'twenty-ui';

export type AppNavigationDrawerProps = {
Expand All @@ -41,15 +38,11 @@ export const AppNavigationDrawer = ({
setIsAdvancedModeEnabled={setIsAdvancedModeEnabled}
/>
),
logo: '',
}
: {
logo: isNonEmptyString(currentWorkspace?.logo)
? getImageAbsoluteURI({
imageUrl: currentWorkspace.logo,
baseUrl: REACT_APP_SERVER_BASE_URL,
})
: undefined,
title: currentWorkspace?.displayName ?? undefined,
logo: currentWorkspace?.logo ?? '',
title: currentWorkspace?.displayName ?? '',
children: <MainNavigationDrawerItems />,
footer: <SupportDropdown />,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type NavigationDrawerProps = {
children: ReactNode;
className?: string;
footer?: ReactNode;
logo: string;
logo?: string;
title: string;
};

Expand Down Expand Up @@ -111,15 +111,15 @@ export const NavigationDrawer = ({
onMouseEnter={handleHover}
onMouseLeave={handleMouseLeave}
>
{isSettingsDrawer && title ? (
!isMobile && <NavigationDrawerBackButton title={title} />
) : (
<NavigationDrawerHeader
name={title}
logo={logo}
showCollapseButton={isHovered}
/>
)}
{isSettingsDrawer && title
? !isMobile && <NavigationDrawerBackButton title={title} />
: logo && (
<NavigationDrawerHeader
name={title}
logo={logo}
showCollapseButton={isHovered}
/>
)}
<StyledItemsContainer isSettings={isSettingsDrawer}>
{children}
</StyledItemsContainer>
Expand Down

0 comments on commit e7c5bbd

Please sign in to comment.