MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / useSidebar

Function useSidebar

src/components/ui/sidebar.tsx:34–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32const SidebarContext = React.createContext<SidebarContext | null>(null);
33
34function useSidebar() {
35 const context = React.useContext(SidebarContext);
36 if (!context) {
37 throw new Error("useSidebar must be used within a SidebarProvider.");
38 }
39
40 return context;
41}
42
43const SidebarProvider = React.forwardRef<
44 HTMLDivElement,

Callers 1

sidebar.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected