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