()
| 52 | const SidebarContext = React.createContext<SidebarContext | null>(null); |
| 53 | |
| 54 | function 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 | |
| 63 | const SidebarProvider = React.forwardRef< |
| 64 | HTMLDivElement, |
no outgoing calls
no test coverage detected