Explorar el Código

change default targetPath to parentPagePath

WNomunomu hace 2 años
padre
commit
6a8851f10f
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      apps/app/src/components/PageSelectModal/PageSelectModal.tsx

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

@@ -71,9 +71,11 @@ export const PageSelectModal: FC = () => {
     return <></>;
   }
 
-  const targetPathOrId = clickedParentPagePath || currentPage.path;
+  const parentPagePath = pathUtils.addTrailingSlash(nodePath.dirname(currentPage.path));
 
-  const targetPath = clickedParentPagePath || currentPage.path;
+  const targetPathOrId = clickedParentPagePath || parentPagePath;
+
+  const targetPath = clickedParentPagePath || parentPagePath;
 
   if (isGuestUser == null) {
     return <></>;