18 lines
338 B
TypeScript
18 lines
338 B
TypeScript
"use client";
|
|
|
|
import { createContext, useContext } from "react";
|
|
|
|
interface SidebarContextType {
|
|
open: boolean;
|
|
setOpen: (open: boolean) => void;
|
|
}
|
|
|
|
export const SidebarContext = createContext<SidebarContextType>({
|
|
open: false,
|
|
setOpen: () => {},
|
|
});
|
|
|
|
export function useSidebarContext() {
|
|
return useContext(SidebarContext);
|
|
}
|