mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-23 14:36:56 +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()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['files'] })
|
||||
queryClient.invalidateQueries({ queryKey: ['shares'] })
|
||||
queryClient.invalidateQueries({
|
||||
predicate: (query) => query.queryKey.includes('comments'),
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user