mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge pull request #2939 from appwrite/claude/fix-sidebar-load-KuiLD
Remove reactive subNavigation binding from page data
This commit is contained in:
Generated
+7021
File diff suppressed because it is too large
Load Diff
@@ -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.
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
import { hasOnboardingDismissed } from '$lib/helpers/onboarding';
|
||||
import { isSidebarOpen, noWidthTransition } from '$lib/stores/sidebar';
|
||||
import { page } from '$app/state';
|
||||
import { page as pageStore } from '$app/stores';
|
||||
import { BillingPlanGroup, type Models } from '@appwrite.io/console';
|
||||
import { getSidebarState, isInDatabasesRoute, updateSidebarState } from '$lib/helpers/sidebar';
|
||||
import { isTabletViewport } from '$lib/stores/viewport';
|
||||
@@ -191,7 +192,7 @@
|
||||
|
||||
$: state = $isSidebarOpen ? 'open' : 'closed';
|
||||
|
||||
$: subNavigation = page.data.subNavigation;
|
||||
$: subNavigation = $pageStore.data.subNavigation;
|
||||
|
||||
$: shouldRenderSidebar =
|
||||
!$isNewWizardStatusOpen && showSideNavigation && !$showOnboardingAnimation;
|
||||
@@ -235,14 +236,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