diff --git a/frontend/src/components/Alert/AlertComponent.tsx b/frontend/src/components/Alert/AlertComponent.tsx index d1d78e5b..8f21733d 100644 --- a/frontend/src/components/Alert/AlertComponent.tsx +++ b/frontend/src/components/Alert/AlertComponent.tsx @@ -150,7 +150,7 @@ export const AlertComponent: React.FC = ({ {alert.status !== Status.IGNORED && ( - {alert.status !== Status.RESOLVED ? ( + {alert.status !== Status.RESOLVED && ( - ) : ( - )} )} diff --git a/frontend/src/components/Alert/AlertDetail.tsx b/frontend/src/components/Alert/AlertDetail.tsx index a24df4a8..0eda571d 100644 --- a/frontend/src/components/Alert/AlertDetail.tsx +++ b/frontend/src/components/Alert/AlertDetail.tsx @@ -298,8 +298,9 @@ export const AlertDetail: React.FC = ({ }} value={resolutionMessage || ""} placeholder={ - alert.status !== Status.RESOLVED && - "Provide reason for resolving..." + alert.status !== Status.RESOLVED + ? "Provide reason for resolving..." + : "" } onChange={e => setResolutionMessage(e.target.value)} /> diff --git a/frontend/src/components/Alert/AlertList.tsx b/frontend/src/components/Alert/AlertList.tsx index ac5221a5..4f8fe931 100644 --- a/frontend/src/components/Alert/AlertList.tsx +++ b/frontend/src/components/Alert/AlertList.tsx @@ -265,8 +265,9 @@ export const AlertList: React.FC = ({ {totalCount && ( - {(page - 1) * params.offset + 1}- - {(page - 1) * params.offset + alerts.length} of {totalCount} alerts + {(page - 1) * ALERT_PAGE_LIMIT + 1}- + {(page - 1) * ALERT_PAGE_LIMIT + alerts.length} of {totalCount}{" "} + alerts = ({ apiEndpointUuid }) => { } return ( - + { - const [debouncedValue, setDebouncedValue] = useState(value); - useEffect( - () => { - const handler = setTimeout(() => { - setDebouncedValue(value); - }, delay); - return () => { - clearTimeout(handler); - }; - }, - [value, delay] - ); - return debouncedValue; + const [debouncedValue, setDebouncedValue] = useState(value) + useEffect(() => { + const handler = setTimeout(() => { + setDebouncedValue(value) + }, delay) + return () => { + clearTimeout(handler) + } + }, [value, delay]) + return debouncedValue }