mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 23:24:21 +00:00
fix(comments): prevent reload of main viewer by invalidating only comments queries
This commit is contained in:
@@ -139,8 +139,9 @@ export const MessageCard: React.FC<MessageCardProps> = ({
|
|||||||
return await res.json()
|
return await res.json()
|
||||||
},
|
},
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
queryClient.invalidateQueries({ queryKey: ['files'] })
|
queryClient.invalidateQueries({
|
||||||
queryClient.invalidateQueries({ queryKey: ['shares'] })
|
predicate: (query) => query.queryKey.includes('comments'),
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user