mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 11:11:16 -05:00
12 lines
297 B
TypeScript
12 lines
297 B
TypeScript
import { useContext } from "react";
|
|
import { SidebarContext } from "@/components/ui/sidebar-context";
|
|
|
|
export function useSidebar() {
|
|
const context = useContext(SidebarContext);
|
|
if (!context) {
|
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
}
|
|
|
|
return context;
|
|
}
|