diff --git a/frontend/src/components/Endpoint/AlertList.tsx b/frontend/src/components/Endpoint/AlertList.tsx index 0fa1e2ae..54a101f5 100644 --- a/frontend/src/components/Endpoint/AlertList.tsx +++ b/frontend/src/components/Endpoint/AlertList.tsx @@ -38,6 +38,25 @@ const AlertList: React.FC = React.memo( } } + const selectedRowColor = useColorModeValue( + "rgb(242, 242, 242)", + "rgb(34, 37, 42)" + ); + + const conditionalStyles = [ + { + when: (row: Alert) => { + if (!alert) { + return false; + } + return row.uuid == alert.uuid; + }, + style: { + backgroundColor: selectedRowColor, + }, + }, + ]; + useEffect(() => { setAlertList(alerts); }, [alerts]); @@ -149,9 +168,12 @@ const AlertList: React.FC = React.memo( >