Skip to content

Commit c9d1d38

Browse files
committed
add loading indicator - might need timeout
1 parent 8b73e52 commit c9d1d38

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎apps/codingcatdev/src/routes/+layout.svelte‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
export let data;
33
44
// Core
5-
import { page } from '$app/stores';
5+
import { page, navigating } from '$app/stores';
66
import { afterNavigate } from '$app/navigation';
77
import { storeCurrentUrl, storeUser } from '$lib/stores/stores';
88
99
//Style
1010
import '../app.postcss';
1111
1212
// BlackCatUI Components
13-
import { AppShell, Modal, Toast, storePopup } from '@codingcatdev/blackcatui';
13+
import { AppShell, Modal, ProgressCircle, Toast, storePopup } from '@codingcatdev/blackcatui';
1414
1515
// Depedency: Floating UI
1616
import { computePosition, autoUpdate, flip, shift, offset, arrow } from '@floating-ui/dom';
@@ -123,7 +123,15 @@
123123
<svelte:fragment slot="bcu-app-shell-header"><CcdAppBar /></svelte:fragment>
124124

125125
<!-- Page Content -->
126-
<slot />
126+
{#if $navigating}
127+
<!-- LOOK HERE -->
128+
<div class="flex flex-col m-2 md:m-8 items-center gap-2 md:gap-8">
129+
<ProgressCircle stroke={60} value={undefined} width="w-20 md:w-36" />
130+
<h1 class="ext-3xl text-center text-cText">Fetching...</h1>
131+
</div>
132+
{:else}
133+
<slot />
134+
{/if}
127135

128136
<!-- Page Footer -->
129137
<svelte:fragment slot="bcu-app-shell-page-footer"><CcdFooter /></svelte:fragment>

0 commit comments

Comments
 (0)