mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
a2cdbd52dc
* add empty state if no pages are available. * set access to private in create page modal when the modal is open form private tab.
12 lines
418 B
TypeScript
12 lines
418 B
TypeScript
import { useContext } from "react";
|
|
// context
|
|
import { StoreContext } from "@/lib/store-context";
|
|
// mobx store
|
|
import { IProjectPageStore } from "@/store/pages/project-page.store";
|
|
|
|
export const useProjectPages = (): IProjectPageStore => {
|
|
const context = useContext(StoreContext);
|
|
if (context === undefined) throw new Error("useProjectPage must be used within StoreProvider");
|
|
return context.projectPages;
|
|
};
|