From 714d2a4154bae5126c5cb24511a0b8ff79e33108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 25 Apr 2023 11:46:58 +0200 Subject: [PATCH] AppNotifications: Fixes issue with missing app notifications (#67190) --- .../components/AppNotifications/AppNotificationList.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/app/core/components/AppNotifications/AppNotificationList.tsx b/public/app/core/components/AppNotifications/AppNotificationList.tsx index b27736e2ee0..467255ff354 100644 --- a/public/app/core/components/AppNotifications/AppNotificationList.tsx +++ b/public/app/core/components/AppNotifications/AppNotificationList.tsx @@ -22,10 +22,10 @@ export function AppNotificationList() { const styles = useStyles2(getStyles); useEffect(() => { - appEvents.on(AppEvents.alertWarning, (payload) => notifyApp(createWarningNotification(...payload))); - appEvents.on(AppEvents.alertSuccess, (payload) => notifyApp(createSuccessNotification(...payload))); - appEvents.on(AppEvents.alertError, (payload) => notifyApp(createErrorNotification(...payload))); - }, []); + appEvents.on(AppEvents.alertWarning, (payload) => dispatch(notifyApp(createWarningNotification(...payload)))); + appEvents.on(AppEvents.alertSuccess, (payload) => dispatch(notifyApp(createSuccessNotification(...payload)))); + appEvents.on(AppEvents.alertError, (payload) => dispatch(notifyApp(createErrorNotification(...payload)))); + }, [dispatch]); const onClearAppNotification = (id: string) => { dispatch(hideAppNotification(id));