Skip to content

Commit 115b40d

Browse files
committed
refac(page /): use direct variable access instead of $deriveds
1 parent 6c586c2 commit 115b40d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/client/src/routes/+page.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
import { useAuth } from "@mmailaender/convex-auth-svelte/sveltekit";
33
import ChatApp from "$components/chat/ChatApp.svelte";
44
5-
const isAuthenticated = $derived(useAuth().isAuthenticated);
6-
const isLoading = $derived(useAuth().isLoading);
5+
const auth = useAuth();
76
</script>
87

9-
{#if isLoading}
8+
{#if auth.isLoading}
109
<div class="flex h-screen w-full items-center justify-center">
1110
<span class="loading loading-dots loading-lg"></span>
1211
</div>
13-
{:else if isAuthenticated}
12+
{:else if auth.isAuthenticated}
1413
<ChatApp />
1514
{:else}
1615
<div class="hero bg-base-100 min-h-screen">

0 commit comments

Comments
 (0)