Fix: Replace styled logo with Avatar component for workspace logo in NavigationDrawerHeader (#9093)
This PR addresses issue #9042 - Replaced the styled logo with the `Avatar` component. - `Avatar` now handles the case when no `logo` is uploaded by using the workspace name's first character as the `placeholder`. - This ensures a consistent fallback when the `logo` is undefined. --------- Co-authored-by: guillim <guigloo@msn.com> Co-authored-by: Félix Malfait <felix@twenty.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { workspacePublicDataState } from '@/auth/states/workspacePublicDataState';
|
||||
import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constants/DefaultWorkspaceLogo';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { getImageAbsoluteURI } from 'twenty-shared';
|
||||
@ -16,7 +17,7 @@ export const PageFavicon = () => {
|
||||
getImageAbsoluteURI({
|
||||
imageUrl: workspacePublicData.logo,
|
||||
baseUrl: REACT_APP_SERVER_BASE_URL,
|
||||
}) ?? ''
|
||||
}) ?? DEFAULT_WORKSPACE_LOGO
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user