kosei-n 2 лет назад
Родитель
Сommit
b06fc19718
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      apps/app/src/components/PageSelectModal/PageSelectModal.tsx

+ 4 - 4
apps/app/src/components/PageSelectModal/PageSelectModal.tsx

@@ -40,10 +40,6 @@ export const PageSelectModal: FC = () => {
 
   const pagePathRenameHandler = usePagePathRenameHandler(currentPage);
 
-  const targetPathOrId = targetId || currentPath;
-
-  const path = currentPath || '/';
-
   const onClickTreeItem = useCallback((page: IPageForItem) => {
     const parentPagePath = page.path;
 
@@ -68,6 +64,10 @@ export const PageSelectModal: FC = () => {
     closeModal();
   }, [clickedParentPagePath, closeModal, currentPage?.path, pagePathRenameHandler]);
 
+  const targetPathOrId = targetId || currentPath;
+
+  const path = currentPath || '/';
+
   if (isGuestUser == null) {
     return null;
   }