|
@@ -2,7 +2,6 @@ import React, {
|
|
|
useState, FC, useMemo, useEffect,
|
|
useState, FC, useMemo, useEffect,
|
|
|
} from 'react';
|
|
} from 'react';
|
|
|
|
|
|
|
|
-import { isIPageInfoForEntityForDeleteModal } from '@growi/core';
|
|
|
|
|
import type {
|
|
import type {
|
|
|
HasObjectId,
|
|
HasObjectId,
|
|
|
IPageInfoForEntity, IPageToDeleteWithMeta, IDataWithMeta,
|
|
IPageInfoForEntity, IPageToDeleteWithMeta, IDataWithMeta,
|
|
@@ -42,6 +41,11 @@ const deleteIconAndKey = {
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
+const isIPageInfoForEntityForDeleteModal = (pageInfo: any | undefined): pageInfo is IPageInfoForEntity => {
|
|
|
|
|
+ return pageInfo != null && 'isDeletable' in pageInfo && 'isAbleToDeleteCompletely' in pageInfo;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const PageDeleteModal: FC = () => {
|
|
const PageDeleteModal: FC = () => {
|
|
|
const { t } = useTranslation();
|
|
const { t } = useTranslation();
|
|
|
|
|
|