Skip to content

Commit

Permalink
chore: rename states
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlitgrace committed Jan 8, 2025
1 parent 3bfec56 commit 14c4770
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let { children, data }: { children: Snippet; data: { profile: Profile } } = $props();
let sidebar_show = $state(false);
let sidebar_transitioning = $state(false);
let sidebar_shown = $state(false);
const authStore = createAuthStore();
Expand All @@ -32,7 +32,7 @@
});
const toggle_show_sidebar = () => {
if (sidebar_transitioning) return;
if (sidebar_shown) return;
sidebar_show = !sidebar_show;
};
</script>
Expand All @@ -50,8 +50,8 @@
<div
class="fixed left-0 top-[3.75rem] z-50 flex h-[calc(100dvh-3.75rem)] w-72 transform transition-transform duration-300 md:hidden"
class:-translate-x-72={!sidebar_show}
ontransitionstart={() => (sidebar_transitioning = true)}
ontransitionend={() => (sidebar_transitioning = false)}
ontransitionstart={() => (sidebar_shown = true)}
ontransitionend={() => (sidebar_shown = false)}
>
<Sidebar />
</div>
Expand Down

0 comments on commit 14c4770

Please sign in to comment.