Explorar o código

add fix for expandable resource button

Alexander Belanger %!s(int64=4) %!d(string=hai) anos
pai
achega
fd73a9e2ec
Modificáronse 1 ficheiros con 10 adicións e 8 borrados
  1. 10 8
      dashboard/src/components/ExpandableResource.tsx

+ 10 - 8
dashboard/src/components/ExpandableResource.tsx

@@ -76,14 +76,16 @@ const ExpandableResource: React.FC<Props> = (props) => {
             </Pair>
           );
         })}
-        <StyledSaveButton
-          onClick={onSave}
-          clearPosition={true}
-          text={button.name}
-          helper={button.description}
-          statusPosition={"right"}
-          className="expanded-save-button"
-        />
+        {button && (
+          <StyledSaveButton
+            onClick={onSave}
+            clearPosition={true}
+            text={button.name}
+            helper={button.description}
+            statusPosition={"right"}
+            className="expanded-save-button"
+          />
+        )}
       </ExpandedWrapper>
     </ResourceTab>
   );