From 2ff5f79f0fca1d4ff22a85c85de62198f431e716 Mon Sep 17 00:00:00 2001 From: Cory Hawkvelt Date: Mon, 20 Apr 2026 13:12:44 +0930 Subject: [PATCH] feat(profile): add resend verification email button --- src/pages/user/ProfilePage.tsx | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/pages/user/ProfilePage.tsx b/src/pages/user/ProfilePage.tsx index 266efdc..32884d3 100644 --- a/src/pages/user/ProfilePage.tsx +++ b/src/pages/user/ProfilePage.tsx @@ -72,6 +72,7 @@ export default function ProfilePage() { const [isEditing, setIsEditing] = useState(false); const [isSaving, setIsSaving] = useState(false); const [pendingInvites, setPendingInvites] = useState([]); + const [isResending, setIsResending] = useState(false); // Delete account dialog state const [deleteDialogOpen, setDeleteDialogOpen] = useState(false); @@ -178,6 +179,25 @@ export default function ProfilePage() { setIsEditing(false); }; + const handleResendVerification = async () => { + setIsResending(true); + try { + await api.auth.resendVerification(user.email); + toast({ + title: "Verification email sent", + description: "Check your inbox.", + }); + } catch (err) { + toast({ + variant: "destructive", + title: "Failed to send", + description: err instanceof ApiError ? err.message : "An error occurred.", + }); + } finally { + setIsResending(false); + } + }; + if (authLoading || !user) { return ; } @@ -315,6 +335,18 @@ export default function ProfilePage() { )} + {!user.email_verified && ( + + )}