mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
9 lines
279 B
TypeScript
9 lines
279 B
TypeScript
|
import { useContext } from "react";
|
||
|
import { PageContext } from "./page-provider";
|
||
|
|
||
|
export const usePage = () => {
|
||
|
const context = useContext(PageContext);
|
||
|
if (context === undefined) throw new Error("useAppRoot must be used within AppRootStoreContext");
|
||
|
return context;
|
||
|
};
|