mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
fix: try to fix invalidate cache in prod
This commit is contained in:
@@ -6,7 +6,7 @@ import { useQueryClient } from "@tanstack/react-query";
|
||||
export function useRevalidatePlaybackProgressCache() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const revalidate = () => {
|
||||
const revalidate = async () => {
|
||||
// List of all the queries to invalidate
|
||||
const queriesToInvalidate = [
|
||||
["item"],
|
||||
@@ -20,9 +20,9 @@ export function useRevalidatePlaybackProgressCache() {
|
||||
];
|
||||
|
||||
// Invalidate each query
|
||||
queriesToInvalidate.forEach((queryKey) => {
|
||||
queryClient.invalidateQueries({ queryKey });
|
||||
});
|
||||
for (const queryKey of queriesToInvalidate) {
|
||||
await queryClient.invalidateQueries({ queryKey });
|
||||
}
|
||||
};
|
||||
|
||||
return revalidate;
|
||||
|
||||
Reference in New Issue
Block a user