MCPcopy Index your code
hub / github.com/fastapi/full-stack-fastapi-template / useSidebar

Function useSidebar

frontend/src/components/ui/sidebar.tsx:45–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43const SidebarContext = React.createContext<SidebarContextProps | null>(null)
44
45function useSidebar() {
46 const context = React.useContext(SidebarContext)
47 if (!context) {
48 throw new Error("useSidebar must be used within a SidebarProvider.")
49 }
50
51 return context
52}
53
54function SidebarProvider({
55 defaultOpen = true,

Callers 7

SidebarAppearanceFunction · 0.90
UserFunction · 0.90
MainFunction · 0.90
SidebarFunction · 0.85
SidebarTriggerFunction · 0.85
SidebarRailFunction · 0.85
SidebarMenuButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected