chore: send verification on mount

This commit is contained in:
Rotimi Best
2024-11-06 21:28:55 +01:00
parent febe1965d9
commit b78a0acc99
@@ -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();
</script>
<Modal {open} isCloseable={false} width="w-4/5" maxWidth="w-[500px]" containerClass="p-4">
@@ -66,7 +69,7 @@
<PrimaryButton
isDisabled={loading || isSent}
className="font-normal"
onClick={resendVerificationCode}
onClick={sendVerificationCode}
>
{#if loading}
{$t('verify_email_modal.loading')}