Skip to content

Commit 61a987c

Browse files
committed
Add a "sign-in to continue" button when unauthenticated
1 parent 8fbc59c commit 61a987c

File tree

1 file changed

+9
-2
lines changed
  • packages/clerk-js/src/ui/components/devPrompts/EnableOrganizationsPrompt

1 file changed

+9
-2
lines changed

packages/clerk-js/src/ui/components/devPrompts/EnableOrganizationsPrompt/index.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,16 @@ const EnableOrganizationsPromptInternal = ({
335335
{isEnabled ? (
336336
<PromptButton
337337
variant='solid'
338-
onClick={() => onSuccess?.()}
338+
onClick={() => {
339+
if (!clerk.user) {
340+
void clerk.redirectToSignIn();
341+
clerk.__internal_closeEnableOrganizationsPrompt?.();
342+
} else {
343+
onSuccess?.();
344+
}
345+
}}
339346
>
340-
Continue
347+
{clerk.user ? 'Continue' : 'Sign in to continue'}
341348
</PromptButton>
342349
) : (
343350
<>

0 commit comments

Comments
 (0)