fix(auth): dismiss the verify banner once the user acts

The verifyInvalid banner (a one-time entry notice) lingered on later screens
after the user clicked its "Send a new link" CTA and returned to sign-in.
Clear the verify state in reset(), so any deliberate action — mode switch,
CTA, or submit — dismisses it.
This commit is contained in:
2026-07-23 00:34:11 +02:00
parent a851fb213b
commit b761a448a8
+4 -1
View File
@@ -321,6 +321,9 @@ function AuthCard() {
const reset = () => {
setError("");
setDone("");
// The verify banners are a one-time entry notice — dismiss once the user takes any deliberate
// action (mode switch, CTA, submit) so it doesn't linger stalely on later screens.
setVerify(null);
};
async function onSubmit(e: React.FormEvent) {
@@ -411,7 +414,7 @@ function AuthCard() {
{t("welcome.auth.verifyInvalid")}{" "}
<button
onClick={() => {
reset();
reset(); // also clears the verify banner (see reset())
setMode("resend");
}}
className="font-semibold text-accent hover:underline"