+5
-3
apps/web/src/pages/home/feed/Feed.tsx
+5
-3
apps/web/src/pages/home/feed/Feed.tsx
···
74
}
75
76
const message = JSON.parse(event.data);
77
-
queryClient.setQueryData(["now-playings"], () => message.nowPlayings);
78
queryClient.setQueryData(
79
["scrobblesChart"],
80
() => message.scrobblesChart,
···
83
await queryClient.invalidateQueries({
84
queryKey: ["infiniteFeed", feedUri],
85
});
86
-
await queryClient.invalidateQueries({ queryKey: ["now-playings"] });
87
-
await queryClient.invalidateQueries({ queryKey: ["scrobblesChart"] });
88
};
89
90
return () => {
···
74
}
75
76
const message = JSON.parse(event.data);
77
+
queryClient.setQueryData(["now-playings"], () => [
78
+
...message.nowPlayings,
79
+
]);
80
queryClient.setQueryData(
81
["scrobblesChart"],
82
() => message.scrobblesChart,
···
85
await queryClient.invalidateQueries({
86
queryKey: ["infiniteFeed", feedUri],
87
});
88
+
// await queryClient.invalidateQueries({ queryKey: ["now-playings"] });
89
+
// await queryClient.invalidateQueries({ queryKey: ["scrobblesChart"] });
90
};
91
92
return () => {
+1
-1
apps/ws/src/main.ts
+1
-1
apps/ws/src/main.ts