From f84f1f5ddaf62d0a8e013c27c16134dd66a5a8f3 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Sat, 12 Aug 2023 05:49:27 +0530 Subject: [PATCH] Fix avatar for org in Shell top (#10712) --- packages/features/shell/Shell.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx index 7dca408fba..ed9d46a670 100644 --- a/packages/features/shell/Shell.tsx +++ b/packages/features/shell/Shell.tsx @@ -24,6 +24,7 @@ import classNames from "@calcom/lib/classNames"; import { APP_NAME, DESKTOP_APP_LINK, JOIN_DISCORD, ROADMAP, WEBAPP_URL } from "@calcom/lib/constants"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import getBrandColours from "@calcom/lib/getBrandColours"; +import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl"; import { useIsomorphicLayoutEffect } from "@calcom/lib/hooks/useIsomorphicLayoutEffect"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { isKeyInObject } from "@calcom/lib/isKeyInObject"; @@ -111,7 +112,6 @@ function useRedirectToLoginIfUnauthenticated(isPublic = false) { const { data: session, status } = useSession(); const loading = status === "loading"; const router = useRouter(); - useEffect(() => { if (isPublic) { return; @@ -307,6 +307,8 @@ function UserDropdown({ small }: UserDropdownProps) { const { t } = useLocale(); const { data: user } = useMeQuery(); const utils = trpc.useContext(); + const bookerUrl = useBookerUrl(); + useEffect(() => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment //@ts-ignore @@ -370,7 +372,7 @@ function UserDropdown({ small }: UserDropdownProps) { )}>