Skip to content
Snippets Groups Projects

CE-3061: Update ioc alerts and status separately

Merged Johanna Szepanski requested to merge CE-3061-update-IOC-alerts-async into develop
1 file
+ 6
3
Compare changes
  • Side-by-side
  • Inline
@@ -10,7 +10,7 @@ function createRequest(id) {
};
}
export const IOCStatus = ({ id }) => {
export const IOCStatus = ({ id, hideAlerts }) => {
const client = useContext(apiContext);
const params = useMemo(() => createRequest(id), [id]);
@@ -35,12 +35,14 @@ export const IOCStatus = ({ id }) => {
});
useEffect(() => {
callFetchIocAlerts();
if (!hideAlerts) {
callFetchIocAlerts();
}
return () => {
abortCallFetchIocAlerts();
};
}, [iocStateStatus]);
}, [iocStateStatus, hideAlerts]);
return (
<Grid
@@ -59,6 +61,7 @@ export const IOCStatus = ({ id }) => {
<Status
state={iocStateStatus}
alert={iocAlert}
hideAlerts={hideAlerts}
/>
)}
</Grid>
Loading