From 6703bc025d524a81982163b57c19d3e951befa1f Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Tue, 12 Nov 2024 14:51:50 -0800 Subject: [PATCH] feature/IO-3026-Enhanced-Notifications - final revisions Signed-off-by: Dave Richer --- .../pages/manage/manage.page.component.jsx | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/client/src/pages/manage/manage.page.component.jsx b/client/src/pages/manage/manage.page.component.jsx index 065fe7b46..6dfd8af6e 100644 --- a/client/src/pages/manage/manage.page.component.jsx +++ b/client/src/pages/manage/manage.page.component.jsx @@ -179,52 +179,6 @@ export function Manage({ conflict, bodyshop, alerts, setAlerts }) { } }, [alerts, displayedAlertIds]); - // useEffect(() => { - // const fetchAlerts = async () => { - // try { - // const response = await fetch(ALERT_FILE_URL); - // - // // Check if the response is OK (status in the range 200-299) - // if (!response.ok) { - // console.error(`Network response was not ok: ${response.status} ${response.statusText}`); - // return; // Exit the function early since we can't proceed - // } - // - // const alerts = await response.json(); - // - // // Check if alerts is an array - // if (!Array.isArray(alerts)) { - // console.error("Alerts data is not an array"); - // return; - // } - // - // const displayedAlerts = JSON.parse(localStorage.getItem("displayedAlerts") || "[]"); - // const alertsNotDisplayed = alerts.filter((alert) => !displayedAlerts.includes(alert.id)); - // - // // Display notifications for alerts not yet displayed - // alertsNotDisplayed.forEach((alert) => { - // // Update localStorage immediately to prevent duplicate notifications - // displayedAlerts.push(alert.id); - // localStorage.setItem("displayedAlerts", JSON.stringify(displayedAlerts)); - // - // notification.open({ - // key: "notification-alerts-" + alert.id, - // message: alert.message, - // description: alert.description, - // type: alert.type || "info", - // duration: 0, - // placement: "bottomRight", - // closable: true - // }); - // }); - // } catch (error) { - // console.error("Error fetching alerts:", error); - // } - // }; - // - // fetchAlerts(); - // }, []); - useEffect(() => { const widgetId = InstanceRenderManager({ imex: "IABVNO4scRKY11XBQkNr",