From 3071b314aee3d0c309f43cb402fd5fd4b77fb84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 12 Nov 2024 21:54:01 +0100 Subject: [PATCH] pl-fe: cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/actions/notifications.ts | 2 +- .../pl-fe/src/api/hooks/streaming/use-user-stream.ts | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/pl-fe/src/actions/notifications.ts b/packages/pl-fe/src/actions/notifications.ts index 2899bce65..7e697ebed 100644 --- a/packages/pl-fe/src/actions/notifications.ts +++ b/packages/pl-fe/src/actions/notifications.ts @@ -87,7 +87,7 @@ const updateNotifications = (notification: BaseNotification) => } }; -const updateNotificationsQueue = (notification: BaseNotification, intlMessages: Record, intlLocale: string, curPath: string) => +const updateNotificationsQueue = (notification: BaseNotification, intlMessages: Record, 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 diff --git a/packages/pl-fe/src/api/hooks/streaming/use-user-stream.ts b/packages/pl-fe/src/api/hooks/streaming/use-user-stream.ts index eb717f8bd..ac161db0c 100644 --- a/packages/pl-fe/src/api/hooks/streaming/use-user-stream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-user-stream.ts @@ -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); });