Files
salam e687b4437b
linter / quality (push) Canceled after 0s
tests / ci (8.3) (push) Canceled after 0s
tests / ci (8.4) (push) Canceled after 0s
tests / ci (8.5) (push) Canceled after 0s
first commit
2026-10-06 18:53:03 +02:00

13 lines
327 B
TypeScript

import { getContext } from 'svelte';
import { SIDEBAR_CONTEXT, type SidebarContext } from './context';
export function useSidebar(): SidebarContext {
const context = getContext<SidebarContext>(SIDEBAR_CONTEXT);
if (!context) {
throw new Error('Sidebar context is not available');
}
return context;
}