Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-signin-signup-redirect-conflict.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/ui": patch
---

Fix redirect conflicts when SignIn and SignUp components are used together on the same page. Added missing dependency arrays to useEffect hooks in redirect functions to prevent unwanted redirects during other component flows.
2 changes: 1 addition & 1 deletion packages/ui/src/components/SignIn/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function RedirectToSignIn() {
const clerk = useClerk();
React.useEffect(() => {
void clerk.redirectToSignIn();
}, []);
}, [clerk]);
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/SignUp/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function RedirectToSignUp() {
const clerk = useClerk();
React.useEffect(() => {
void clerk.redirectToSignUp();
}, []);
}, [clerk]);
return null;
}

Expand Down