From e40cf0ffac90dac2b1b5859e29cd68be5c996adf Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Thu, 19 Jun 2025 11:03:55 -0700 Subject: [PATCH] Fixed pilot admin meesage event handler not removed onEffect --- apps/dispatch/app/_components/QueryProvider.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/dispatch/app/_components/QueryProvider.tsx b/apps/dispatch/app/_components/QueryProvider.tsx index 754fea34..2e222dba 100644 --- a/apps/dispatch/app/_components/QueryProvider.tsx +++ b/apps/dispatch/app/_components/QueryProvider.tsx @@ -96,6 +96,7 @@ export function QueryProvider({ children }: { children: ReactNode }) { dispatchSocket.off("pilots-update", invalidateConnectedUsers); dispatchSocket.off("update-connectedAircraft", invalidateConenctedAircrafts); dispatchSocket.off("notification", handleNotification); + pilotSocket.off("notification", handleNotification); }; }, [queryClient, mapStore]);