Feroze Mohideen преди 3 години
родител
ревизия
229860c3f2
променени са 1 файла, в които са добавени 17 реда и са изтрити 9 реда
  1. 17 9
      dashboard/src/components/porter/ExpandableSection.tsx

+ 17 - 9
dashboard/src/components/porter/ExpandableSection.tsx

@@ -40,15 +40,23 @@ const ExpandableSection: React.FC<Props> = ({
       {noWrapper ? (
       {noWrapper ? (
         <Container row spaced={spaced}>
         <Container row spaced={spaced}>
           {Header}
           {Header}
-          {copy ? (<ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
-            {isExpanded ? collapseText : expandText}
-          </ExpandButton>) : (<div>          <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
-            {isExpanded ? collapseText : expandText}
-          </ExpandButton>          <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
-              {isExpanded ? collapseText : expandText}
-            </ExpandButton></div>)}
-
-
+          {copy ?
+            (
+              <div>
+                <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
+                  {isExpanded ? collapseText : expandText}
+                </ExpandButton>
+                <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
+                  {isExpanded ? collapseText : expandText}
+                </ExpandButton>
+              </div>
+            ) :
+            (
+              <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
+                {isExpanded ? collapseText : expandText}
+              </ExpandButton>
+            )
+          }
         </Container>
         </Container>
       ) : (
       ) : (
         <HeaderRow
         <HeaderRow