Files
thrilltrack-explorer/src-old/hooks/useSidebar.ts

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;
}