UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

16 lines (15 loc) • 515 B
"use client"; import { createContext, use } from "react"; //#region src/dashboard/ConsoleShell/context.ts const ConsoleShellContext = createContext(null); function useConsoleShell() { const value = use(ConsoleShellContext); if (!value) throw new Error("useConsoleShell must be used within ConsoleShell"); return value; } function useConsoleShellState() { return use(ConsoleShellContext); } //#endregion export { ConsoleShellContext, useConsoleShell, useConsoleShellState }; //# sourceMappingURL=context.mjs.map