chore: only open verify modal when org data is present
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
<script>
|
<script>
|
||||||
{
|
|
||||||
}
|
|
||||||
import Modal from '$lib/components/Modal/index.svelte';
|
import Modal from '$lib/components/Modal/index.svelte';
|
||||||
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
|
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
|
||||||
import { snackbar } from '$lib/components/Snackbar/store';
|
import { snackbar } from '$lib/components/Snackbar/store';
|
||||||
@@ -14,6 +12,7 @@
|
|||||||
const WAIT_SEC = 120;
|
const WAIT_SEC = 120;
|
||||||
const WAIT_TIME = WAIT_SEC * 1000;
|
const WAIT_TIME = WAIT_SEC * 1000;
|
||||||
|
|
||||||
|
let open = false;
|
||||||
let loading = false;
|
let loading = false;
|
||||||
let isSent = false;
|
let isSent = false;
|
||||||
|
|
||||||
@@ -47,15 +46,11 @@
|
|||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}, WAIT_TIME);
|
}, WAIT_TIME);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$: open = Boolean(!$profile.is_email_verified && !!$currentOrg.id);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Modal
|
<Modal {open} isCloseable={false} width="w-4/5" maxWidth="w-[500px]" containerClass="p-4">
|
||||||
open={!$profile.is_email_verified}
|
|
||||||
isCloseable={false}
|
|
||||||
width="w-4/5"
|
|
||||||
maxWidth="w-[500px]"
|
|
||||||
containerClass="p-4"
|
|
||||||
>
|
|
||||||
<div class="flex flex-col items-center space-y-6 text-center">
|
<div class="flex flex-col items-center space-y-6 text-center">
|
||||||
<img src="/verify-email.svg" alt="email verification" />
|
<img src="/verify-email.svg" alt="email verification" />
|
||||||
<p class="font-bold text-xl">Verify your Email</p>
|
<p class="font-bold text-xl">Verify your Email</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user