From 38f0c709bd6c0e588666c24dfbe13b7c1013fbab Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Mon, 30 Oct 2023 13:54:28 +0200 Subject: [PATCH] fix(clerk-js): Use only userProfileUrl prop to check what userProfileMode should be used --- .../clerk-js/src/ui/contexts/ClerkUIComponentsContext.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/clerk-js/src/ui/contexts/ClerkUIComponentsContext.tsx b/packages/clerk-js/src/ui/contexts/ClerkUIComponentsContext.tsx index c1c8b47a96..e976d6c0d8 100644 --- a/packages/clerk-js/src/ui/contexts/ClerkUIComponentsContext.tsx +++ b/packages/clerk-js/src/ui/contexts/ClerkUIComponentsContext.tsx @@ -241,7 +241,8 @@ export const useUserButtonContext = () => { const afterSwitchSessionUrl = ctx.afterSwitchSessionUrl || displayConfig.afterSwitchSessionUrl; const navigateAfterSwitchSession = () => navigate(afterSwitchSessionUrl); - const userProfileMode = !!userProfileUrl && ctx.userProfileMode === undefined ? 'navigation' : ctx.userProfileMode; + const userProfileMode = + !!ctx.userProfileUrl && ctx.userProfileMode === undefined ? 'navigation' : ctx.userProfileMode; return { ...ctx, @@ -254,7 +255,7 @@ export const useUserButtonContext = () => { afterMultiSessionSingleSignOutUrl, afterSignOutUrl, afterSwitchSessionUrl, - userProfileMode, + userProfileMode: userProfileMode || 'modal', }; };