Explorar o código

using isUsersProtectedPages

kaori %!s(int64=4) %!d(string=hai) anos
pai
achega
8a3db9c492
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      packages/app/src/components/Sidebar/PageTree/Item.tsx

+ 1 - 2
packages/app/src/components/Sidebar/PageTree/Item.tsx

@@ -115,7 +115,6 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
     onRenamed, onClickDuplicateMenuItem, onClickDeleteMenuItem, isEnableActions,
   } = props;
 
-  const { isUsersTopPage, isUsersHomePage } = pagePathUtils;
   const { page, children } = itemNode;
 
   const [currentChildren, setCurrentChildren] = useState(children);
@@ -153,7 +152,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
     type: 'PAGE_TREE',
     item: { page },
     canDrag: () => {
-      const isDraggable = !isUsersTopPage(page.path ?? '/') && !isUsersHomePage(page.path ?? '/');
+      const isDraggable = !pagePathUtils.isUsersProtectedPages(page.path ?? '');
       return isDraggable;
     },
     end: (item, monitor) => {