From 42494c7c2b3ecd19fa3ff1ba03e90cd47f0a541f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efra=C3=ADn=20Roch=C3=ADn?= Date: Wed, 28 Jun 2023 06:12:33 -0700 Subject: [PATCH] fix: [CAL-2005] Issue with loading skeleton on new side menu (#9829) * remove mx-auto from the Icon in bottom navigation link * add loading skeleton for the profile links --- packages/features/shell/Shell.tsx | 48 ++++++++++++++----------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx index 7ab961b687..f87a829068 100644 --- a/packages/features/shell/Shell.tsx +++ b/packages/features/shell/Shell.tsx @@ -797,32 +797,26 @@ function SideBar({ bannersHeight, user }: SideBarProps) { const orgBranding = useOrgBrandingValues(); const publicPageUrl = orgBranding?.slug ? getOrganizationUrl(orgBranding?.slug) : ""; const bottomNavItems: NavigationItemType[] = [ - ...(user?.username - ? [ - { - name: "view_public_page", - href: !!user?.organizationId - ? publicPageUrl - : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${user.username}`, - icon: ExternalLink, - target: "__blank", - }, - { - name: "copy_public_page_link", - href: "", - onClick: (e: { preventDefault: () => void }) => { - e.preventDefault(); - navigator.clipboard.writeText( - !!user?.organizationId - ? publicPageUrl - : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${user.username}` - ); - showToast(t("link_copied"), "success"); - }, - icon: Copy, - }, - ] - : []), + { + name: "view_public_page", + href: !!user?.organizationId + ? publicPageUrl + : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${user?.username}`, + icon: ExternalLink, + target: "__blank", + }, + { + name: "copy_public_page_link", + href: "", + onClick: (e: { preventDefault: () => void }) => { + e.preventDefault(); + navigator.clipboard.writeText( + !!user?.organizationId ? publicPageUrl : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${user?.username}` + ); + showToast(t("link_copied"), "success"); + }, + icon: Copy, + }, { name: "settings", href: user?.organizationId @@ -922,7 +916,7 @@ function SideBar({ bannersHeight, user }: SideBarProps) {