diff --git a/react-frontend/src/components/IncidentsBlock.jsx b/react-frontend/src/components/IncidentsBlock.jsx index c1e4199a..e9e1e16d 100644 --- a/react-frontend/src/components/IncidentsBlock.jsx +++ b/react-frontend/src/components/IncidentsBlock.jsx @@ -17,7 +17,7 @@ const IncidentsBlock = ({ service, group }) => { data = await API.incidents_service(service.id); } - if(Array.isArray(data)) { + if (Array.isArray(data)) { setIncidents(data); } } @@ -36,8 +36,7 @@ const IncidentsBlock = ({ service, group }) => { {incidents?.length > 0 ? ( incidents?.map((incident) => { const { id, title, description, updates, updated_at } = incident; - const latestUpdate = - updates?.length > 0 && updates[0]; + const latestUpdate = updates?.length > 0 && updates[0]; const updatedAt = latestUpdate ? latestUpdate.created_at : updated_at; @@ -50,25 +49,23 @@ const IncidentsBlock = ({ service, group }) => { className={`incident-title col-12 ${ incidentsShow[id] && "mb-3" }`}> - {updates?.length > 0 && ( - <> - {incidentsShow[id] ? ( - - ) : ( - - )} - > - )} + <> + {incidentsShow[id] ? ( + + ) : ( + + )} + >