From a283a3deedb45ec7a18ea912d4f8ee66de73d7a1 Mon Sep 17 00:00:00 2001 From: Hinson Chan Date: Thu, 25 Apr 2024 01:01:44 -0700 Subject: [PATCH] 5161 - fix workspace icon is missing on multi-workspace (#5165) Fixes #5161 image detail: before this PR, the icon would display as normal for the default data:// icons, but not for uploaded files (`workspace-logo/original/{}.png` for example). This PR fixes this by calling the getImageAbsoluteURIOrBase64 function to resolve the missing path. --- .../components/MultiWorkspaceDropdownButton.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdownButton.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdownButton.tsx index f89bc1eef..0249de11c 100644 --- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdownButton.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdownButton.tsx @@ -14,6 +14,7 @@ import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/consta import { MULTI_WORKSPACE_DROPDOWN_ID } from '@/ui/navigation/navigation-drawer/constants/MulitWorkspaceDropdownId'; import { useWorkspaceSwitching } from '@/ui/navigation/navigation-drawer/hooks/useWorkspaceSwitching'; import { NavigationDrawerHotKeyScope } from '@/ui/navigation/navigation-drawer/types/NavigationDrawerHotKeyScope'; +import { getImageAbsoluteURIOrBase64 } from '~/utils/image/getImageAbsoluteURIOrBase64'; const StyledLogo = styled.div<{ logo: string }>` background: url(${({ logo }) => logo}); @@ -86,9 +87,11 @@ export const MultiWorkspaceDropdownButton = ({ {currentWorkspace?.displayName ?? ''} @@ -107,9 +110,11 @@ export const MultiWorkspaceDropdownButton = ({ avatar={ }