diff --git a/src/app/(account)/forgot-password/page.tsx b/src/app/(account)/forgot-password/page.tsx index 8add8171..48f7ee82 100644 --- a/src/app/(account)/forgot-password/page.tsx +++ b/src/app/(account)/forgot-password/page.tsx @@ -45,8 +45,14 @@ export default function ForgotPasswordPage() { resolver: zodResolver(resetPasswordSchema), }); + const [sendCodeLoading, setSendCodeLoading] = useState(false); + const [resetPasswordLoading, setResetPasswordLoading] = useState(false); + const handleSendCode = sendCodeForm.handleSubmit(async ({ email }) => { if (!isLoaded) return; + + setSendCodeLoading(true); + try { const result = await signIn.create({ strategy: 'reset_password_email_code', @@ -70,10 +76,15 @@ export default function ForgotPasswordPage() { }, ]); } + + setSendCodeLoading(false); }); const handleResetPassword = resetPasswordForm.handleSubmit(async ({ code, password }) => { if (!isLoaded) return; + + setResetPasswordLoading(true); + try { const resetResult = await signIn.attemptFirstFactor({ strategy: 'reset_password_email_code', @@ -105,6 +116,8 @@ export default function ForgotPasswordPage() { }, ]); } + + setResetPasswordLoading(false); }); return ( @@ -120,7 +133,12 @@ export default function ForgotPasswordPage() { control={sendCodeForm.control} name="email" /> - @@ -145,7 +163,12 @@ export default function ForgotPasswordPage() { control={resetPasswordForm.control} name="code" /> - diff --git a/src/app/(account)/join/steps/StepOne.tsx b/src/app/(account)/join/steps/StepOne.tsx index 3b01b4f6..9d13d0fe 100644 --- a/src/app/(account)/join/steps/StepOne.tsx +++ b/src/app/(account)/join/steps/StepOne.tsx @@ -31,8 +31,13 @@ function VerifyEmail() { const { isLoaded, signUp, setActive } = useSignUp(); + const [verifyEmailLoading, setVerifyEmailLoading] = useState(false); + const handleVerify = form.handleSubmit(async ({ code }) => { if (!isLoaded) return; + + setVerifyEmailLoading(true); + try { const completeSignUp = await signUp.attemptEmailAddressVerification({ code, @@ -53,13 +58,20 @@ function VerifyEmail() { }, ]); } + + setVerifyEmailLoading(false); }); return (
- @@ -88,8 +100,13 @@ export default function StepOne() { const { signUp, isLoaded } = useSignUp(); const [pendingVerification, setPendingVerification] = useState(false); + const [emailJoinLoading, setEmailJoinLoading] = useState(false); + const handleSignUp = form.handleSubmit(async (formData) => { if (!isLoaded) return; + + setEmailJoinLoading(true); + try { await signUp.create(formData); await signUp.prepareEmailAddressVerification({ strategy: 'email_code' }); @@ -111,6 +128,8 @@ export default function StepOne() { }, ]); } + + setEmailJoinLoading(false); }); const handleGoogleSignUp = async () => { @@ -152,7 +171,12 @@ export default function StepOne() { name="password" />
-
diff --git a/src/app/(account)/join/steps/StepTwo.tsx b/src/app/(account)/join/steps/StepTwo.tsx index c99a1aae..7e9e7de2 100644 --- a/src/app/(account)/join/steps/StepTwo.tsx +++ b/src/app/(account)/join/steps/StepTwo.tsx @@ -61,7 +61,7 @@ export default function StepTwo() { { if (!isLoaded) return; + + setSignInLoading(true); + try { const result = await signIn.create({ identifier: email, @@ -59,6 +65,8 @@ export default function SignInPage() { }, ]); } + + setSignInLoading(false); }); const handleGoogleSignIn = async () => { @@ -110,7 +118,12 @@ export default function SignInPage() { > Forgot password? - diff --git a/src/app/sponsors/page.tsx b/src/app/sponsors/page.tsx index 3835f624..f13e25da 100644 --- a/src/app/sponsors/page.tsx +++ b/src/app/sponsors/page.tsx @@ -13,7 +13,7 @@ export default function SponsorsPage() {
- The University of Adelaide Computer Science Club are proudly supported by our{' '} + The University of Adelaide Computer Science Club is proudly supported by our{' '} generous sponsors. Their unwavering support make events and workshops possible, fostering an environment for aspiring tech enthusiasts to excel within our community.