Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
35C4n0r committed Nov 21, 2024
1 parent 40d3c07 commit d9856e9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions keep-ui/app/alerts/EnrichAlertModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const EnrichAlertModal: React.FC<EnrichAlertModalProps> = ({
value: string
) => {
setCustomFields((prev) =>
prev.map((item, i) => (i === index ? { ...item, [field]: value } : item)),
prev.map((item, i) => (i === index ? { ...item, [field]: value } : item))
);
};

Expand All @@ -62,16 +62,15 @@ const EnrichAlertModal: React.FC<EnrichAlertModalProps> = ({
}, [alert]);

useEffect(() => {

const validateData = () => {
const areFieldsIdentical =
customFields.length === preEnrichedFields.length &&
customFields.every((field) => {
const matchingField = preEnrichedFields.find(
(preField) => preField.key === field.key
);
return matchingField && matchingField.value === field.value;
});
customFields.length === preEnrichedFields.length &&
customFields.every((field) => {
const matchingField = preEnrichedFields.find(
(preField) => preField.key === field.key
);
return matchingField && matchingField.value === field.value;
});

if (areFieldsIdentical) {
setIsDataValid(false);
Expand Down

0 comments on commit d9856e9

Please sign in to comment.