Explorar el Código

Hide Save button on revision preview for source config on stacks.

jnfrati hace 3 años
padre
commit
5be38b4ee9

+ 12 - 10
dashboard/src/main/home/cluster-dashboard/stacks/ExpandedStack/_SourceConfig.tsx

@@ -99,16 +99,18 @@ const _SourceConfig = ({
           </SourceConfigStyles.ItemContainer>
         );
       })}
-      <SourceConfigStyles.SaveButtonRow>
-        <SourceConfigStyles.SaveButton
-          onClick={handleSave}
-          text="Save"
-          clearPosition={true}
-          makeFlush={true}
-          status={buttonStatus}
-          statusPosition="left"
-        />
-      </SourceConfigStyles.SaveButtonRow>
+      {readOnly ? null : (
+        <SourceConfigStyles.SaveButtonRow>
+          <SourceConfigStyles.SaveButton
+            onClick={handleSave}
+            text="Save"
+            clearPosition={true}
+            makeFlush={true}
+            status={buttonStatus}
+            statusPosition="left"
+          />
+        </SourceConfigStyles.SaveButtonRow>
+      )}
     </SourceConfigStyles.Wrapper>
   );
 };