Преглед изворни кода

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

白石誠 пре 5 година
родитељ
комит
cfc67606c8
1 измењених фајлова са 7 додато и 0 уклоњено
  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">