From 171253336b98170de32c43d08b6c5792b08e5289 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 8 Dec 2023 10:46:34 +0100 Subject: [PATCH] fix(ui): remove err overlay, wrap notifications fetch in trycatch --- .../app/components/Alerts/Notifications/Notifications.tsx | 6 +++++- frontend/webpack.config.ts | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/Alerts/Notifications/Notifications.tsx b/frontend/app/components/Alerts/Notifications/Notifications.tsx index af79b37de..51b74536a 100644 --- a/frontend/app/components/Alerts/Notifications/Notifications.tsx +++ b/frontend/app/components/Alerts/Notifications/Notifications.tsx @@ -18,7 +18,11 @@ function Notifications() { useEffect(() => { const interval = setInterval(() => { - void notificationStore.fetchNotificationsCount(); + try { + void notificationStore.fetchNotificationsCount(); + } catch (e) { + console.error(e); + } }, AUTOREFRESH_INTERVAL); return () => clearInterval(interval); diff --git a/frontend/webpack.config.ts b/frontend/webpack.config.ts index a187e69f2..00b221fdf 100644 --- a/frontend/webpack.config.ts +++ b/frontend/webpack.config.ts @@ -138,6 +138,13 @@ const config: Configuration = { hot: true, compress: true, allowedHosts: "all", + client: { + overlay: { + errors: true, + warnings: false, + runtimeErrors: false, + } + }, }, };