Explorar o código

change default targetPath to parentPagePath

WNomunomu %!s(int64=2) %!d(string=hai) anos
pai
achega
6a8851f10f

+ 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 <></>;