Просмотр исходного кода

125692 put together conditional branch

soumaeda 2 лет назад
Родитель
Сommit
5abc242e02

+ 2 - 14
apps/app/src/components/PageList/PageListItemS.tsx

@@ -32,25 +32,13 @@ export const PageListItemS = (props: PageListItemSProps): JSX.Element => {
     pagePathElement = <a className="text-break" href={page.path}>{pagePathElement}</a>;
   }
 
-  if (isNarrowView) {
-    pagePathElement = (
-      <div className={`${styles['page-list']}`}>
-        <div className="mx-2 page-title">
-          <Clamp lines={2}>
-            <a className="text-break" href={page.path}>{pagePathElement}</a>
-          </Clamp>
-        </div>
-      </div>
-    );
-  }
-
   return (
     <>
       {isNarrowView ? (
         <div className={`d-flex ${styles['page-list']}`}>
           <UserPicture user={page.lastUpdateUser} noLink={noLink} />
-          <div className="page-path-element">
-            {pagePathElement}
+          <div className="mx-2 page-title">
+            <Clamp lines={2}>{pagePathElement}</Clamp>
           </div>
           <span className="ml-2 page-list-ul">
             <PageListMeta page={page} />

+ 1 - 4
packages/ui/src/styles/molecules/_page_list.scss

@@ -92,10 +92,7 @@
   }
 
   .page-title {
-    line-height: 1.2;
-  }
-
-  .page-path-element {
     flex: 1;
+    line-height: 1.2;
   }
 }