Explorar o código

implemented so that when there are no child pages "no pages message will appear"

白石誠 %!s(int64=5) %!d(string=hai) anos
pai
achega
cfc67606c8
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      src/client/js/components/PageList.jsx

+ 7 - 0
src/client/js/components/PageList.jsx

@@ -56,6 +56,13 @@ const PageList = (props) => {
       <Page page={page} />
     </li>
   ));
+  if (pageList.length === 0) {
+    return (
+      <div className="mt-2">
+        There are no pages under <strong>{ path }</strong>.
+      </div>
+    );
+  }
 
   return (
     <div className="page-list-container-create">