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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,10 +22,10 @@ export function AppNotificationList() {
const styles = useStyles2(getStyles); const styles = useStyles2(getStyles);
useEffect(() => { useEffect(() => {
appEvents.on(AppEvents.alertWarning, (payload) => notifyApp(createWarningNotification(...payload))); appEvents.on(AppEvents.alertWarning, (payload) => dispatch(notifyApp(createWarningNotification(...payload))));
appEvents.on(AppEvents.alertSuccess, (payload) => notifyApp(createSuccessNotification(...payload))); appEvents.on(AppEvents.alertSuccess, (payload) => dispatch(notifyApp(createSuccessNotification(...payload))));
appEvents.on(AppEvents.alertError, (payload) => notifyApp(createErrorNotification(...payload))); appEvents.on(AppEvents.alertError, (payload) => dispatch(notifyApp(createErrorNotification(...payload))));
}, []); }, [dispatch]);
const onClearAppNotification = (id: string) => { const onClearAppNotification = (id: string) => {
dispatch(hideAppNotification(id)); dispatch(hideAppNotification(id));