refac: layout load

This commit is contained in:
Timothy Jaeryang Baek 2025-04-10 09:15:08 -07:00
parent a3e477e100
commit 0611eb8ac7

View File

@ -45,6 +45,7 @@
import AccountPending from '$lib/components/layout/Overlay/AccountPending.svelte';
import UpdateInfoToast from '$lib/components/layout/UpdateInfoToast.svelte';
import { get } from 'svelte/store';
import Spinner from '$lib/components/common/Spinner.svelte';
const i18n = getContext('i18n');
@ -254,7 +255,6 @@
<div
class=" text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900 h-screen max-h-[100dvh] overflow-auto flex flex-row justify-end"
>
{#if loaded}
{#if !['user', 'admin'].includes($user?.role)}
<AccountPending />
{:else if localDBChats.length > 0}
@ -312,7 +312,13 @@
{/if}
<Sidebar />
{#if loaded}
<slot />
{:else}
<div class="w-full flex-1 h-full flex items-center justify-center">
<Spinner />
</div>
{/if}
</div>
</div>