From 31ccfa7c9f4751cf36d61d7b077f285199d497da Mon Sep 17 00:00:00 2001 From: Moshe Immermam Date: Fri, 15 Nov 2024 11:14:27 +0200 Subject: [PATCH] chore: fix notification rules table --- .../Rules/NotificationsRulesTable.tsx | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/components/Notifications/Rules/NotificationsRulesTable.tsx b/src/components/Notifications/Rules/NotificationsRulesTable.tsx index 529980f6f..90b66ebc6 100644 --- a/src/components/Notifications/Rules/NotificationsRulesTable.tsx +++ b/src/components/Notifications/Rules/NotificationsRulesTable.tsx @@ -1,14 +1,9 @@ import { NotificationRules } from "@flanksource-ui/api/types/notifications"; -import { Modal } from "@flanksource-ui/ui/Modal"; import MRTDataTable from "@flanksource-ui/ui/MRTDataTable/MRTDataTable"; -import { useAtom } from "jotai"; import { useCallback } from "react"; import { useSearchParams } from "react-router-dom"; import EditNotificationRules from "./EditNotificationRules"; -import { - notificationMostCommonErrorAtom, - notificationsRulesTableColumns -} from "./notificationsRulesTableColumns"; +import { notificationsRulesTableColumns } from "./notificationsRulesTableColumns"; type NotificationsTableProps = { notifications: NotificationRules[]; @@ -29,14 +24,6 @@ export default function NotificationsRulesTable({ const selectedNotificationId = searchParams.get("id"); - const [mostCommonErrorNotification, setMostCommonErrorNotification] = useAtom( - notificationMostCommonErrorAtom - ); - const modalTitle = - mostCommonErrorNotification?.title ?? - mostCommonErrorNotification?.person?.name ?? - mostCommonErrorNotification?.team?.name; - const onSelectNotification = useCallback( (notification: NotificationRules) => { const id = notification.id; @@ -48,17 +35,6 @@ export default function NotificationsRulesTable({ return ( <> - {mostCommonErrorNotification && ( - setMostCommonErrorNotification(undefined)} - title={`${modalTitle ?? "Most Common Error"}`} - > -
- {mostCommonErrorNotification.most_common_error} -
-
- )}