-
Notifications
You must be signed in to change notification settings - Fork 419
fix(ui): add clerk dependency to redirect useEffect hooks #7529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Fixes redirect conflicts when SignIn and SignUp components are used together on the same page by adding proper dependency arrays to useEffect hooks in RedirectToSignIn and RedirectToSignUp components.
🦋 Changeset detectedLatest commit: d710ede The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@Ayush2k02 is attempting to deploy a commit to the Clerk Production Team on Vercel. A member of the Team first needs to authorize it. |
Testing LimitationI've verified that the fix addresses the exact issue identified in #7456 (specifically the However, I'm unable to fully test this fix locally because:
What I've Verified✅ The fix is applied to the exact location identified by the issue reporter The fix will be testable once merged and deployed to Clerk's CDN. |
📝 WalkthroughWalkthroughThe PR bumps the patch version for Possibly related issues
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes redirect conflicts when SignIn and SignUp components are used together on the same page.
Problem
When both
<SignIn />and<SignUp />components are rendered on the same page, they interfere with each other's navigation flows, causing unexpected redirects to the Clerk domain.Root Cause
The
RedirectToSignInandRedirectToSignUpcomponents had incomplete dependency arrays in their useEffect hooks:This violates React's exhaustive-deps rule and can cause unpredictable behavior.
Solution
Added
clerkto the dependency arrays:Changes
RedirectToSignInin packages/ui/src/components/SignIn/index.tsxRedirectToSignUpin packages/ui/src/components/SignUp/index.tsxNotes
Related to issue #7456
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.