From 9328205fb7f9b8c09109e4de0e2620cfb4689ed6 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Wed, 31 Jan 2024 00:36:11 -0800
Subject: fix(media): don't load media collection of no identity

---
 src/routes/+layout.svelte | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

(limited to 'src/routes/+layout.svelte')

diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 059d1e60..4709a975 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -140,17 +140,19 @@
 	<p />
 
 	<Notifications item={Notification} zIndex={5000}>
-		{#if $userIdentity.id !== -1}
-			<Root {data} {way}><slot /></Root>
-		{:else if data.url === '/settings'}
-			<Skeleton />
-		{:else if data.url === '/tools'}
-			<Skeleton count={1} height="75vh" />
-		{:else if data.url === '/schedule'}
-			<Skeleton grid={true} width="50%" count={2} height="25vh" />
-		{:else}
-			<Skeleton grid={true} width="50%" count={2} height="25vh" />
-		{/if}
+		<Root {data} {way}>
+			{#if $userIdentity.id !== -1}
+				<slot />
+			{:else if data.url === '/settings'}
+				<Skeleton />
+			{:else if data.url === '/tools'}
+				<Skeleton count={1} height="75vh" />
+			{:else if data.url === '/schedule'}
+				<Skeleton grid={true} width="50%" count={2} height="25vh" />
+			{:else}
+				<Skeleton grid={true} width="50%" count={2} height="25vh" />
+			{/if}
+		</Root>
 	</Notifications>
 </div>
 
-- 
cgit v1.2.3

