|
@@ -24,7 +24,7 @@ const SearchResultContentSubNavigation: FC<Props> = (props : Props) => {
|
|
|
appContainer, pageId, revisionId, path, isCompactMode, isSignleLineMode,
|
|
appContainer, pageId, revisionId, path, isCompactMode, isSignleLineMode,
|
|
|
} = props;
|
|
} = props;
|
|
|
|
|
|
|
|
- const { isTrashPage } = pagePathUtils;
|
|
|
|
|
|
|
+ const { isTrashPage, isDeletablePage } = pagePathUtils;
|
|
|
|
|
|
|
|
const { data: tagInfoData, error: tagInfoError, mutate: mutateTagInfo } = useSWRTagsInfo(pageId);
|
|
const { data: tagInfoData, error: tagInfoError, mutate: mutateTagInfo } = useSWRTagsInfo(pageId);
|
|
|
|
|
|
|
@@ -42,6 +42,7 @@ const SearchResultContentSubNavigation: FC<Props> = (props : Props) => {
|
|
|
if (tagInfoError != null || tagInfoData == null) {
|
|
if (tagInfoError != null || tagInfoData == null) {
|
|
|
return <></>;
|
|
return <></>;
|
|
|
}
|
|
}
|
|
|
|
|
+ const isPageDeletable = isDeletablePage(path);
|
|
|
const { isSharedUser } = appContainer;
|
|
const { isSharedUser } = appContainer;
|
|
|
const isAbleToShowPageManagement = !(isTrashPage(path)) && !isSharedUser;
|
|
const isAbleToShowPageManagement = !(isTrashPage(path)) && !isSharedUser;
|
|
|
return (
|
|
return (
|
|
@@ -62,7 +63,7 @@ const SearchResultContentSubNavigation: FC<Props> = (props : Props) => {
|
|
|
pageId={pageId}
|
|
pageId={pageId}
|
|
|
revisionId={revisionId}
|
|
revisionId={revisionId}
|
|
|
path={path}
|
|
path={path}
|
|
|
- isDeletable
|
|
|
|
|
|
|
+ isDeletable={isPageDeletable}
|
|
|
isAbleToDeleteCompletely
|
|
isAbleToDeleteCompletely
|
|
|
willShowPageManagement={isAbleToShowPageManagement}
|
|
willShowPageManagement={isAbleToShowPageManagement}
|
|
|
>
|
|
>
|