feat(UIShell): only render hamburger menu if SideNav exists (#457)

* feat(UIShell): only render hamburger menu if SideNav exists

* feat(SideNav): store logic moved to onMount
This commit is contained in:
josef 2020-12-09 11:14:32 -06:00 committed by GitHub
commit a9e63e0038
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View file

@ -10,6 +10,14 @@
/** Set to `true` to toggle the expanded state */
export let isOpen = false;
import { onMount } from "svelte";
import { shouldRenderHamburgerMenu } from "../navStore";
onMount(() => {
shouldRenderHamburgerMenu.set(true);
return () => shouldRenderHamburgerMenu.set(false);
});
</script>
{#if fixed}