()
| 37 | const SidebarContext = React.createContext<SidebarContext | null>(null); |
| 38 | |
| 39 | function useSidebar() { |
| 40 | const context = React.useContext(SidebarContext); |
| 41 | if (!context) { |
| 42 | throw new Error("useSidebar must be used within a SidebarProvider."); |
| 43 | } |
| 44 | |
| 45 | return context; |
| 46 | } |
| 47 | |
| 48 | const SidebarProvider = React.forwardRef< |
| 49 | HTMLDivElement, |
no outgoing calls
no test coverage detected