first commit
This commit is contained in:
commit
e687b4437b
418 files changed
+33577
No files matched your search
@@ -0,0 +1,12 @@
|
||||
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;
|
||||
}
|
||||
Reference in new issue
Block a user