From d982ccd4d16df2f4b9cd850178191fe1ea0c8fcd Mon Sep 17 00:00:00 2001 From: karamvir Date: Sat, 5 Aug 2023 22:14:21 -0700 Subject: [PATCH] update alerter card --- frontend/src/resources/alerter/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/resources/alerter/index.tsx b/frontend/src/resources/alerter/index.tsx index 936cdf536..4743fb353 100644 --- a/frontend/src/resources/alerter/index.tsx +++ b/frontend/src/resources/alerter/index.tsx @@ -7,14 +7,14 @@ import { Link, useParams } from "react-router-dom"; export const AlerterName = ({ id }: { id: string }) => { const alerters = useRead("ListAlerters", {}).data; - const alerter = alerters?.find((a) => a._id?.$oid === id); + const alerter = alerters?.find((a) => a.id === id); if (!alerter) return null; return <>{alerter.name}; }; const AlerterInfo = ({ id }: { id: string }) => { const alerters = useRead("ListAlerters", {}).data; - const alerter = alerters?.find((a) => a._id?.$oid === id); + const alerter = alerters?.find((a) => a.id === id); if (!alerter) return null; return <>some description; }; @@ -37,13 +37,13 @@ export const AlerterPage = () => { export const AlerterCard = ({ id }: { id: string }) => { const alerters = useRead("ListAlerters", {}).data; - const alerter = alerters?.find((a) => a._id?.$oid === id); + const alerter = alerters?.find((a) => a.id === id); if (!alerter) return null; return ( } >