From b78a0acc99c7157fbfcfad3f5dc4352c9cfd5c70 Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Wed, 6 Nov 2024 21:28:55 +0100 Subject: [PATCH] chore: send verification on mount --- .../lib/components/Org/VerifyEmail/VerifyEmailModal.svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/lib/components/Org/VerifyEmail/VerifyEmailModal.svelte b/apps/dashboard/src/lib/components/Org/VerifyEmail/VerifyEmailModal.svelte index 8d5f9e2f..032f2e4c 100644 --- a/apps/dashboard/src/lib/components/Org/VerifyEmail/VerifyEmailModal.svelte +++ b/apps/dashboard/src/lib/components/Org/VerifyEmail/VerifyEmailModal.svelte @@ -20,7 +20,9 @@ let interval; let countDown = WAIT_SEC; - const resendVerificationCode = async () => { + const sendVerificationCode = async () => { + if (isSent) return; + loading = true; try { @@ -50,6 +52,7 @@ }; $: open = Boolean(!$profile.is_email_verified && !!$currentOrg.id); + $: open && sendVerificationCode(); @@ -66,7 +69,7 @@ {#if loading} {$t('verify_email_modal.loading')}