Fix:쿼리 초기화
This commit is contained in:
parent
7848a3cc8e
commit
bfa8a799eb
@ -102,8 +102,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc
|
||||
{ projectId, folderId: node.id, memberId },
|
||||
{
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, folderId] });
|
||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, node.id] });
|
||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId] });
|
||||
onRefetch();
|
||||
},
|
||||
}
|
||||
@ -113,7 +112,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc
|
||||
{ projectId, folderId, imageId: node.id },
|
||||
{
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, folderId] });
|
||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId] });
|
||||
queryClient.invalidateQueries({ queryKey: ['image', node.id] });
|
||||
onRefetch();
|
||||
},
|
||||
@ -133,8 +132,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc
|
||||
{
|
||||
onSuccess: () => {
|
||||
console.log(folderId, node?.id);
|
||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, folderId] });
|
||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, node?.id] });
|
||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId] });
|
||||
|
||||
onRefetch();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user