Skip to content

Commit

Permalink
fix: hide 'run in docker' & fix areAllFieldsBoolean type guard
Browse files Browse the repository at this point in the history
  • Loading branch information
alashchev17 committed Dec 11, 2024
1 parent f178a75 commit 68b2c3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export const IntegrationAvailability: FC<IntegrationAvailabilityProps> = ({
onChange(fieldName, checked);
};

// TODO: temporal solution to hide the switch for isolated mode
if (fieldName === "when_isolated") return null;

return (
<Flex style={{ marginBottom: "0.75rem" }}>
<Flex align="center" justify="between">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function areAllFieldsBoolean(json: unknown): json is Record<string, boolean> {
return (
typeof json === "object" &&
json !== null &&
Object.entries(json).every((value) => typeof value === "boolean")
Object.values(json).every((value) => typeof value === "boolean")
);
}

Expand Down
1 change: 1 addition & 0 deletions src/components/IntegrationsView/IntegrationsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export const IntegrationsView: FC<IntegrationViewProps> = ({
setCurrentNotConfiguredIntegration(null);
setIsDisabledIntegrationForm(true);
}
setAvailabilityValues({});
information && dispatch(clearInformation());
globalError && dispatch(clearError());
dispatch(integrationsApi.util.resetApiState());
Expand Down

0 comments on commit 68b2c3d

Please sign in to comment.