|
@@ -136,7 +136,7 @@ type Props = CommonProps & {
|
|
|
isIdenticalPathPage?: boolean,
|
|
isIdenticalPathPage?: boolean,
|
|
|
isForbidden: boolean,
|
|
isForbidden: boolean,
|
|
|
isNotFound: boolean,
|
|
isNotFound: boolean,
|
|
|
- IsNotCreatable: boolean,
|
|
|
|
|
|
|
+ IsNotCreatablePage: boolean,
|
|
|
// isAbleToDeleteCompletely: boolean,
|
|
// isAbleToDeleteCompletely: boolean,
|
|
|
|
|
|
|
|
isSearchServiceConfigured: boolean,
|
|
isSearchServiceConfigured: boolean,
|
|
@@ -310,8 +310,8 @@ const GrowiPage: NextPage<Props> = (props: Props) => {
|
|
|
<>
|
|
<>
|
|
|
<PageAlerts />
|
|
<PageAlerts />
|
|
|
{ props.isForbidden && <ForbiddenPage /> }
|
|
{ props.isForbidden && <ForbiddenPage /> }
|
|
|
- { props.IsNotCreatable && <NotCreatablePage />}
|
|
|
|
|
- { !props.isForbidden && !props.IsNotCreatable && <DisplaySwitcher />}
|
|
|
|
|
|
|
+ { props.IsNotCreatablePage && <NotCreatablePage />}
|
|
|
|
|
+ { !props.isForbidden && !props.IsNotCreatablePage && <DisplaySwitcher />}
|
|
|
{/* <DisplaySwitcher /> */}
|
|
{/* <DisplaySwitcher /> */}
|
|
|
{/* <PageStatusAlert /> */}
|
|
{/* <PageStatusAlert /> */}
|
|
|
</>
|
|
</>
|
|
@@ -434,7 +434,7 @@ async function injectRoutingInformation(context: GetServerSidePropsContext, prop
|
|
|
}
|
|
}
|
|
|
else if (page == null) {
|
|
else if (page == null) {
|
|
|
props.isNotFound = true;
|
|
props.isNotFound = true;
|
|
|
- props.IsNotCreatable = !isCreatablePage(currentPathname);
|
|
|
|
|
|
|
+ props.IsNotCreatablePage = !isCreatablePage(currentPathname);
|
|
|
// check the page is forbidden or just does not exist.
|
|
// check the page is forbidden or just does not exist.
|
|
|
const count = isPermalink ? await Page.count({ _id: pageId }) : await Page.count({ path: currentPathname });
|
|
const count = isPermalink ? await Page.count({ _id: pageId }) : await Page.count({ path: currentPathname });
|
|
|
props.isForbidden = count > 0;
|
|
props.isForbidden = count > 0;
|