AppNotifications: Fixes issue with missing app notifications (#67190)

This commit is contained in:
Torkel Ödegaard
2023-04-25 11:46:58 +02:00
committed by GitHub
parent 64ee42d01e
commit 714d2a4154

View File

@@ -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));