UI enhancemnts
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import '../styles/app.scss';
|
||||
import Spinner from '$lib/components/shared/Spinner.svelte';
|
||||
import { authStore } from '$lib/stores/auth.store.svelte.js';
|
||||
import { watchlistStore } from '$lib/stores/watchlist.store.svelte.js';
|
||||
import type { Snippet } from 'svelte';
|
||||
let { children }: { children: Snippet } = $props();
|
||||
|
||||
@@ -19,6 +20,13 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Load watchlist once when user is authenticated
|
||||
$effect(() => {
|
||||
if (authStore.isLoggedIn && !watchlistStore.ready && !watchlistStore.loading) {
|
||||
watchlistStore.load();
|
||||
}
|
||||
});
|
||||
|
||||
const navLabel = $derived(
|
||||
activePath === '/portfolio' ? 'Loading portfolio…' :
|
||||
activePath?.startsWith('/calls') ? 'Loading market calls…' :
|
||||
|
||||
Reference in New Issue
Block a user