change sidebar default to collapsed

This commit is contained in:
faiztyanirh 2026-02-26 17:04:10 +07:00
parent 5817f74ace
commit 8529c91058
2 changed files with 10 additions and 1 deletions

3
src/routes/+error.svelte Normal file
View File

@ -0,0 +1,3 @@
<div>
eyoy
</div>

View File

@ -11,15 +11,21 @@
import { Button } from "$lib/components/ui/button/index.js";
import { Separator } from "$lib/components/ui/separator/index.js";
import { Toaster } from "$lib/components/ui/sonner/index.js";
import { onMount } from 'svelte';
let { children, data } = $props();
let sidebarOpen = $state(true);
onMount(() => {
sidebarOpen = false;
});
</script>
<svelte:head>
<link rel="icon" href={favicon} />
</svelte:head>
<Sidebar.Provider>
<Sidebar.Provider open={sidebarOpen}>
<AppSidebar />
<Sidebar.Inset class="flex flex-col h-screen overflow-hidden">
<header class="flex h-10 shrink-0 items-center justify-between gap-2">