[WEB-1436] chore: pages improvement. (#4657)
* add empty state if no pages are available. * set access to private in create page modal when the modal is open form private tab.
This commit is contained in:
parent
608e193c36
commit
a2cdbd52dc
17 changed files with 95 additions and 64 deletions
|
|
@ -4,11 +4,8 @@ import { StoreContext } from "@/lib/store-context";
|
|||
// mobx store
|
||||
import { IProjectPageStore } from "@/store/pages/project-page.store";
|
||||
|
||||
export const useProjectPages = (projectId: string | undefined): IProjectPageStore => {
|
||||
export const useProjectPages = (): IProjectPageStore => {
|
||||
const context = useContext(StoreContext);
|
||||
if (context === undefined) throw new Error("useProjectPage must be used within StoreProvider");
|
||||
|
||||
if (!projectId) throw new Error("projectId must be passed as a property");
|
||||
|
||||
return context.projectPages;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue