Skip to content

Scheduling infrastructure for absolutely everyone.

fix: add "Use a different email" button to verify-email page (#28398)

swalihkolakkadana694202c4690
diff --git a/apps/web/modules/auth/verify-email-view.tsx b/apps/web/modules/auth/verify-email-view.tsx
index 7b8c114b391..12e492d485b 100644
--- a/apps/web/modules/auth/verify-email-view.tsx
+++ b/apps/web/modules/auth/verify-email-view.tsx
@@ -1,6 +1,6 @@
"use client";
-import { useSession } from "next-auth/react";
+import { signOut, useSession } from "next-auth/react";
import { useRouter } from "next/navigation";
import posthog from "posthog-js";
import { useEffect } from "react";
@@ -83,16 +83,25 @@ function VerifyEmailPage() {
</Button>
))}
</div>
- <Button
- color="minimal"
- loading={mutation.isPending}
- onClick={() => {
- posthog.capture("verify_email_resend_clicked");
- showToast(t("send_email"), "success");
- mutation.mutate();
- }}>
- {t("resend_email")}
- </Button>
+ <div className="flex flex-col items-center gap-2">
+ <Button
+ color="minimal"
+ loading={mutation.isPending}
+ onClick={() => {
+ posthog.capture("verify_email_resend_clicked");
+ showToast(t("send_email"), "success");
+ mutation.mutate();
+ }}>
+ {t("resend_email")}
+ </Button>
+ <Button
+ color="minimal"
+ onClick={() => {
+ signOut({ callbackUrl: "/signup" });
+ }}>
+ {t("use_different_email")}
+ </Button>
+ </div>
</>
}
/>
diff --git a/packages/i18n/locales/en/common.json b/packages/i18n/locales/en/common.json
index 0bce6a56331..94f730f9778 100644
--- a/packages/i18n/locales/en/common.json
+++ b/packages/i18n/locales/en/common.json
@@ -2264,6 +2264,7 @@
"you": "You",
"or_continue_with": "Or continue with",
"resend_email": "Resend email",
+ "use_different_email": "Use a different email",
"member_already_invited": "Member has already been invited",
"already_in_use_error": "Username already in use",
"enter_email_or_username": "Enter an email or username",