mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Fix database sidebar not appearing on client-side navigation
The subNavigation variable was being reactively assigned from page.data in both shell.svelte and navigation.svelte, connected via bind:. This competing reactive ownership caused the value to not update properly during client-side navigation (only on full page refresh). Made shell.svelte the single source of truth by removing the duplicate reactive assignment from navigation.svelte and switching from bind: to one-way prop passing. https://claude.ai/code/session_012QCz2xVatAtJ3Q6FSp1cB4
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
import { getContext } from 'svelte';
|
||||
import type { Writable } from 'svelte/store';
|
||||
|
||||
export let subNavigation;
|
||||
|
||||
$: subNavigation = page.data.subNavigation;
|
||||
// We need to have this second variable, because we only want narrow
|
||||
// to change automatically if we change from having a second side nav to
|
||||
// not having one, not when the second side nav changes to a different value.
|
||||
|
||||
@@ -235,14 +235,14 @@
|
||||
project={activeProject}
|
||||
progressCard={getProgressCard()}
|
||||
avatar={navbarProps.avatar}
|
||||
bind:subNavigation
|
||||
{subNavigation}
|
||||
bind:sideBarIsOpen={$isSidebarOpen}
|
||||
bind:showAccountMenu
|
||||
bind:state />
|
||||
{/if}
|
||||
|
||||
{#if !$showOnboardingAnimation}
|
||||
<SideNavigation bind:subNavigation />
|
||||
<SideNavigation {subNavigation} />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user