chore: send verification on mount
This commit is contained in:
@@ -20,7 +20,9 @@
|
|||||||
let interval;
|
let interval;
|
||||||
let countDown = WAIT_SEC;
|
let countDown = WAIT_SEC;
|
||||||
|
|
||||||
const resendVerificationCode = async () => {
|
const sendVerificationCode = async () => {
|
||||||
|
if (isSent) return;
|
||||||
|
|
||||||
loading = true;
|
loading = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -50,6 +52,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$: open = Boolean(!$profile.is_email_verified && !!$currentOrg.id);
|
$: open = Boolean(!$profile.is_email_verified && !!$currentOrg.id);
|
||||||
|
$: open && sendVerificationCode();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Modal {open} isCloseable={false} width="w-4/5" maxWidth="w-[500px]" containerClass="p-4">
|
<Modal {open} isCloseable={false} width="w-4/5" maxWidth="w-[500px]" containerClass="p-4">
|
||||||
@@ -66,7 +69,7 @@
|
|||||||
<PrimaryButton
|
<PrimaryButton
|
||||||
isDisabled={loading || isSent}
|
isDisabled={loading || isSent}
|
||||||
className="font-normal"
|
className="font-normal"
|
||||||
onClick={resendVerificationCode}
|
onClick={sendVerificationCode}
|
||||||
>
|
>
|
||||||
{#if loading}
|
{#if loading}
|
||||||
{$t('verify_email_modal.loading')}
|
{$t('verify_email_modal.loading')}
|
||||||
|
|||||||
Reference in New Issue
Block a user