Procházet zdrojové kódy

WIP: refactor Page component

Yuki Takei před 6 roky
rodič
revize
6039f99b70
1 změnil soubory, kde provedl 19 přidání a 12 odebrání
  1. 19 12
      src/client/js/components/PageList/Page.jsx

+ 19 - 12
src/client/js/components/PageList/Page.jsx

@@ -14,22 +14,29 @@ export default class Page extends React.Component {
       link = page.path;
     }
 
-    const hasChildren = this.props.children != null;
-
     return (
-      <li className="nav-item page-list-li w-100">
-        <a className="nav-link page-list-link d-flex align-items-center" href={link}>
-          <UserPicture user={page.lastUpdateUser} />
+      <>
+        <UserPicture user={page.lastUpdateUser} />
+        <a className="text-break" href={link}>
           <PagePath page={page} excludePathString={this.props.excludePathString} />
-          <PageListMeta page={page} />
-          { hasChildren && (
-            <React.Fragment>
-              {this.props.children}
-            </React.Fragment>
-          )}
         </a>
-      </li>
+        <PageListMeta page={page} />
+      </>
     );
+    // return (
+    //   <li className="nav-item page-list-li w-100">
+    //     <a className="nav-link page-list-link d-flex align-items-center" href={link}>
+    //       <UserPicture user={page.lastUpdateUser} />
+    //       <PagePath page={page} excludePathString={this.props.excludePathString} />
+    //       <PageListMeta page={page} />
+    //       { hasChildren && (
+    //         <React.Fragment>
+    //           {this.props.children}
+    //         </React.Fragment>
+    //       )}
+    //     </a>
+    //   </li>
+    // );
   }
 
 }