MCPcopy
hub / github.com/janhq/jan / useSidebar

Function useSidebar

web-app/src/components/ui/sidebar.tsx:54–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52const SidebarContext = React.createContext<SidebarContext | null>(null);
53
54function useSidebar() {
55 const context = React.useContext(SidebarContext);
56 if (!context) {
57 throw new Error("useSidebar must be used within a SidebarProvider.");
58 }
59
60 return context;
61}
62
63const SidebarProvider = React.forwardRef<
64 HTMLDivElement,

Callers 3

NavProjectsFunction · 0.90
ThreadListFunction · 0.90
sidebar.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected