fix: add "Use a different email" button to verify-email page (#28398)
* fix: add "Use a different email" button to verify-email page Closes #28393 * fix: address review feedback on verify-email page - Use signOut({ callbackUrl }) instead of manual redirect - Stack buttons vertically with flex-col --------- Co-authored-by: Romit <[email protected]>
This commit is contained in:
1 parent
c496801655
commit
a694202c46
2 files changed
+21
-11
No files matched your search
@@ -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>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user