diff options
Diffstat (limited to 'ui/routes/(app)/+layout.svelte')
| -rw-r--r-- | ui/routes/(app)/+layout.svelte | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/routes/(app)/+layout.svelte b/ui/routes/(app)/+layout.svelte index acaea53..84090e7 100644 --- a/ui/routes/(app)/+layout.svelte +++ b/ui/routes/(app)/+layout.svelte @@ -1,16 +1,17 @@ <script> import { page } from '$app/stores'; import { goto } from '$app/navigation'; - import { onMount, onDestroy } from 'svelte'; + import { onMount, onDestroy, getContext } from 'svelte'; import { boot, subscribeToEvents } from '$lib/apiServer'; - import { showMenu, currentUser, logins, channelsList, messages } from '$lib/store'; + import { currentUser, logins, channelsList, messages } from '$lib/store'; import ChannelList from '$lib/components/ChannelList.svelte'; import CreateChannelForm from '$lib/components/CreateChannelForm.svelte'; let events = null; + let pageContext = getContext('page'); let { children } = $props(); let loading = $state(true); let channel = $derived($page.params.channel); @@ -97,7 +98,7 @@ <h2>Loading…</h2> {:else} <div id="interface" class="p-2"> - <nav id="sidebar" data-expanded={$showMenu}> + <nav id="sidebar" data-expanded={pageContext.showMenu}> <div class="channel-list"> <ChannelList active={channel} channels={$channelsList.channels} /> </div> |
