Skip to content

Commit 85da4a1

Browse files
committed
Use $app/stores for subNavigation reactivity in shell.svelte
The $app/state page proxy was not properly triggering $: reactive statements during client-side navigation. Switch to the store-based $page from $app/stores which has reliable reactivity tracking in Svelte legacy mode. https://claude.ai/code/session_012QCz2xVatAtJ3Q6FSp1cB4
1 parent 44b3454 commit 85da4a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/layout/shell.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import { hasOnboardingDismissed } from '$lib/helpers/onboarding';
1616
import { isSidebarOpen, noWidthTransition } from '$lib/stores/sidebar';
1717
import { page } from '$app/state';
18+
import { page as pageStore } from '$app/stores';
1819
import { BillingPlanGroup, type Models } from '@appwrite.io/console';
1920
import { getSidebarState, isInDatabasesRoute, updateSidebarState } from '$lib/helpers/sidebar';
2021
import { isTabletViewport } from '$lib/stores/viewport';
@@ -191,7 +192,7 @@
191192
192193
$: state = $isSidebarOpen ? 'open' : 'closed';
193194
194-
$: subNavigation = page.data.subNavigation;
195+
$: subNavigation = $pageStore.data.subNavigation;
195196
196197
$: shouldRenderSidebar =
197198
!$isNewWizardStatusOpen && showSideNavigation && !$showOnboardingAnimation;

0 commit comments

Comments
 (0)