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 },
|
{ projectId, folderId: node.id, memberId },
|
||||||
{
|
{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, folderId] });
|
queryClient.invalidateQueries({ queryKey: ['folder', projectId] });
|
||||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, node.id] });
|
|
||||||
onRefetch();
|
onRefetch();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -113,7 +112,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc
|
|||||||
{ projectId, folderId, imageId: node.id },
|
{ projectId, folderId, imageId: node.id },
|
||||||
{
|
{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, folderId] });
|
queryClient.invalidateQueries({ queryKey: ['folder', projectId] });
|
||||||
queryClient.invalidateQueries({ queryKey: ['image', node.id] });
|
queryClient.invalidateQueries({ queryKey: ['image', node.id] });
|
||||||
onRefetch();
|
onRefetch();
|
||||||
},
|
},
|
||||||
@ -133,8 +132,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc
|
|||||||
{
|
{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
console.log(folderId, node?.id);
|
console.log(folderId, node?.id);
|
||||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, folderId] });
|
queryClient.invalidateQueries({ queryKey: ['folder', projectId] });
|
||||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, node?.id] });
|
|
||||||
|
|
||||||
onRefetch();
|
onRefetch();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user