()
| 45 | const SidebarContext = React.createContext<SidebarContextProps | null>(null) |
| 46 | |
| 47 | function useSidebar() { |
| 48 | const context = React.useContext(SidebarContext) |
| 49 | if (!context) { |
| 50 | throw new Error("useSidebar must be used within a SidebarProvider.") |
| 51 | } |
| 52 | |
| 53 | return context |
| 54 | } |
| 55 | |
| 56 | const SidebarProvider = React.forwardRef< |
| 57 | HTMLDivElement, |
no outgoing calls
no test coverage detected