Sfoglia il codice sorgente

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

白石誠 5 anni fa
parent
commit
cfc67606c8
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  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">