2023-12-13 09:02:52 +03:00
|
|
|
<script>
|
|
|
|
|
import { page } from '$app/stores';
|
|
|
|
|
import AddOrgModal from '$lib/components/Org/AddOrgModal/AddOrgModal.svelte';
|
|
|
|
|
import { isQuizPage } from '$lib/utils/functions/app';
|
|
|
|
|
import OrgSideBar from '$lib/components/Org/SideBar.svelte';
|
2024-03-22 06:30:24 +01:00
|
|
|
import VerifyEmailModal from '$lib/components/Org/VerifyEmail/VerifyEmailModal.svelte';
|
2024-04-07 06:08:34 +01:00
|
|
|
import Box from '$lib/components/Box/index.svelte';
|
|
|
|
|
import { currentOrg } from '$lib/utils/store/org';
|
|
|
|
|
import { goto } from '$app/navigation';
|
|
|
|
|
|
|
|
|
|
export let data;
|
|
|
|
|
|
|
|
|
|
$: if ($currentOrg.id && data.orgName === '*') {
|
|
|
|
|
goto(`/org/${$currentOrg.siteName}`);
|
|
|
|
|
}
|
2023-12-13 09:02:52 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<AddOrgModal />
|
2024-04-19 05:45:48 +01:00
|
|
|
|
2024-03-22 06:30:24 +01:00
|
|
|
<VerifyEmailModal />
|
2024-04-19 05:45:48 +01:00
|
|
|
|
2023-12-13 09:02:52 +03:00
|
|
|
<div class="org-root w-full flex items-center justify-between">
|
|
|
|
|
{#if !isQuizPage($page.url?.pathname)}
|
|
|
|
|
<OrgSideBar />
|
|
|
|
|
{/if}
|
|
|
|
|
<div class="org-slot bg-white dark:bg-black w-full">
|
2024-04-07 06:08:34 +01:00
|
|
|
{#if data.orgName === '*'}
|
|
|
|
|
<Box>Taking you to your organization...</Box>
|
|
|
|
|
{:else}
|
|
|
|
|
<slot />
|
|
|
|
|
{/if}
|
2023-12-13 09:02:52 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|