pl-fe: cleanup

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-11-12 21:54:01 +01:00
parent 74d0d4c60b
commit 3071b314ae
2 changed files with 2 additions and 9 deletions

View file

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

View file

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