pl-fe: cleanup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
74d0d4c60b
commit
3071b314ae
2 changed files with 2 additions and 9 deletions
|
@ -87,7 +87,7 @@ const updateNotifications = (notification: BaseNotification) =>
|
|||
}
|
||||
};
|
||||
|
||||
const updateNotificationsQueue = (notification: BaseNotification, intlMessages: Record<string, string>, intlLocale: string, curPath: string) =>
|
||||
const updateNotificationsQueue = (notification: BaseNotification, intlMessages: Record<string, string>, intlLocale: string) =>
|
||||
(dispatch: AppDispatch, getState: () => RootState) => {
|
||||
if (!notification.type) return; // drop invalid notifications
|
||||
if (notification.type === 'chat_mention') return; // Drop chat notifications, handle them per-chat
|
||||
|
|
|
@ -118,14 +118,7 @@ const useUserStream = () => {
|
|||
break;
|
||||
case 'notification':
|
||||
messages[getLocale()]().then(messages => {
|
||||
dispatch(
|
||||
updateNotificationsQueue(
|
||||
event.payload,
|
||||
messages,
|
||||
getLocale(),
|
||||
window.location.pathname,
|
||||
),
|
||||
);
|
||||
dispatch(updateNotificationsQueue(event.payload, messages, getLocale()));
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue