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