diff --git a/components/frontend/src/lib/components/layout/HackathonSidebar.svelte b/components/frontend/src/lib/components/layout/HackathonSidebar.svelte index 03dfbc59..d0c968be 100644 --- a/components/frontend/src/lib/components/layout/HackathonSidebar.svelte +++ b/components/frontend/src/lib/components/layout/HackathonSidebar.svelte @@ -42,11 +42,6 @@ let collapsed = $state(false); let mobileOpen = $state(false); let isDesktop = $state(true); - // Closed to start with, leaving Manage Hackathon alone under the heading: a - // participant spine plus one way in, not a second nav half again as long as - // the first on every page whether or not the organiser came to manage - // anything. Ten organiser entries sat flat under the heading before this. - let manageOpen = $state(false); // `collapsed` is a desktop-only preference (persisted below); on a narrow // viewport the drawer must always render fully expanded regardless of it. @@ -66,15 +61,6 @@ // Manage Pages. const activeId = $derived(activeNavId($page.url.pathname, [...items, ...manageItems])); - // The hub stays on the rail whatever the fold state and carries the - // disclosure for the rest — it is how the section is entered. - const manageHubItem = $derived(manageItems.find((i) => i.id === 'manage:hackathon')); - const manageSubItems = $derived(manageItems.filter((i) => i.id !== 'manage:hackathon')); - - // The hub counts as inside, not just the screens under it: opening it is how - // an organiser goes looking for the rest. - const insideManage = $derived(activeId?.startsWith('manage:') ?? false); - // `membership.role` is sourced from casbin. It is absent for a global admin who // never joined, hence the second argument. const badge = $derived(hackathonRoleBadge(membership ?? undefined, isGlobalAdmin)); @@ -82,14 +68,6 @@ $effect(() => { if (typeof localStorage === 'undefined') return; collapsed = localStorage.getItem('sidebar-collapsed') === 'true'; - manageOpen = localStorage.getItem('sidebar-manage-open') === 'true'; - }); - - // Entering the section opens it, rather than pinning it open while you are in - // there: deriving the fold state from the route instead made the chevron a - // no-op on every Manage page, which reads as a broken control. - $effect(() => { - if (insideManage) manageOpen = true; }); $effect(() => { @@ -129,11 +107,6 @@ collapsed = !collapsed; remember('sidebar-collapsed', collapsed); } - - function toggleManage() { - manageOpen = !manageOpen; - remember('sidebar-manage-open', manageOpen); - }