From 0e531da2e0538055d03bb76f21e4c8499dee9ab8 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Sat, 30 May 2026 10:03:55 +0200 Subject: [PATCH] fix(watchlists): invalidate watchlists list query on add/remove --- hooks/useWatchlistMutations.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hooks/useWatchlistMutations.ts b/hooks/useWatchlistMutations.ts index e3e39ef96..5e65ebf99 100644 --- a/hooks/useWatchlistMutations.ts +++ b/hooks/useWatchlistMutations.ts @@ -177,6 +177,9 @@ export const useAddToWatchlist = () => { } }, onSuccess: (_data, variables) => { + queryClient.invalidateQueries({ + queryKey: ["streamystats", "watchlists"], + }); queryClient.invalidateQueries({ queryKey: ["streamystats", "watchlist", variables.watchlistId], }); @@ -235,6 +238,9 @@ export const useRemoveFromWatchlist = () => { } }, onSuccess: (_data, variables) => { + queryClient.invalidateQueries({ + queryKey: ["streamystats", "watchlists"], + }); queryClient.invalidateQueries({ queryKey: ["streamystats", "watchlist", variables.watchlistId], });