Skip to content

Commit

Permalink
fix(clerk-js): Use only userProfileUrl prop to check what userProfile…
Browse files Browse the repository at this point in the history
…Mode should be used
  • Loading branch information
octoper committed Oct 31, 2023
1 parent edd201c commit e0bc858
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -254,7 +255,7 @@ export const useUserButtonContext = () => {
afterMultiSessionSingleSignOutUrl,
afterSignOutUrl,
afterSwitchSessionUrl,
userProfileMode,
userProfileMode: userProfileMode || 'modal',
};
};

Expand Down

0 comments on commit e0bc858

Please sign in to comment.