diff --git a/app/auth/register/page.tsx b/app/auth/register/page.tsx index ddb08c7..ab04eb4 100644 --- a/app/auth/register/page.tsx +++ b/app/auth/register/page.tsx @@ -74,8 +74,6 @@ function RegisterForm() { const [mounted, setMounted] = useState(false); const [passwordStrength, setPasswordStrength] = useState(0); const [focusedField, setFocusedField] = useState(null); - const [success, setSuccess] = useState(false); - const [submittedEmail, setSubmittedEmail] = useState(""); const [referralCode, setReferralCode] = useState(null); const router = useRouter(); const { toast } = useToast(); @@ -175,9 +173,8 @@ function RegisterForm() { "Please check your email to verify your account before signing in.", }); - // Persist success state and show verification instructions instead of redirecting - setSubmittedEmail(email); - setSuccess(true); + // Redirect to sign in page + router.push("/auth/signin"); } catch (error: any) { // Enhanced error handling for Supabase registration let userMessage = "Failed to create account. Please try again."; @@ -233,74 +230,6 @@ function RegisterForm() { password === confirmPassword && password.length >= 6; - // Success view: show verification instructions - if (success) { - return ( -
-
-
-
-
-
-
- -
-

- Verify Your Email -

-

- We sent a verification link to {submittedEmail}. - Please check your inbox and confirm your email to complete signup. -

-
- -
- - -
- -
-

If you don't see the email, check your spam or promotions folder.

-

Make sure your Supabase project allows redirects from your current domain.

-
- -
- Back to Sign In -
-
-
-
-
- ); - } // Memoized referral handler to prevent unnecessary re-renders const handleReferral = useCallback((code: string | null) => { diff --git a/package-lock.json b/package-lock.json index 74673a4..12e9fa4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4566,9 +4566,9 @@ } }, "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "license": "ISC", "optional": true, "bin": { @@ -18686,9 +18686,9 @@ } }, "node_modules/nan": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.24.0.tgz", - "integrity": "sha512-Vpf9qnVW1RaDkoNKFUvfxqAbtI8ncb8OJlqZ9wwpXzWPEsvsB1nvdUi6oYrHIkQ1Y/tMDnr1h4nczS0VB9Xykg==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.25.0.tgz", + "integrity": "sha512-0M90Ag7Xn5KMLLZ7zliPWP3rT90P6PN+IzVFS0VqmnPktBk3700xUVv8Ikm9EUaUE5SDWdp/BIxdENzVznpm1g==", "license": "MIT", "optional": true }, @@ -22460,6 +22460,7 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "deprecated": "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "license": "ISC", "optional": true, "dependencies": {