Merge branch 'fe/fix/upload' into 'fe/develop'
Fix: 컨텍스트 메뉴 쿼리키 초기화 관련 수정 See merge request s11-s-project/S11P21S002!307
This commit is contained in:
commit
4711859631
@ -19,7 +19,9 @@ export default function WorkspaceNavigation() {
|
|||||||
const workspaces = workspacesResponse?.workspaceResponses || [];
|
const workspaces = workspacesResponse?.workspaceResponses || [];
|
||||||
|
|
||||||
const activeWorkspaceId = workspaceId ?? workspaces[0]?.id;
|
const activeWorkspaceId = workspaceId ?? workspaces[0]?.id;
|
||||||
const activeProjectId: number = Number(location.pathname.split('/')[3] || '0');
|
const activeProjectId: number = location.pathname.includes('/request')
|
||||||
|
? 0
|
||||||
|
: Number(location.pathname.split('/')[3] || '0');
|
||||||
|
|
||||||
if (workspaces.length === 0) {
|
if (workspaces.length === 0) {
|
||||||
return <div></div>;
|
return <div></div>;
|
||||||
|
@ -87,8 +87,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, folderId] });
|
queryClient.invalidateQueries({ queryKey: ['folder'] });
|
||||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, node.id] });
|
|
||||||
onRefetch();
|
onRefetch();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -102,8 +101,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'] });
|
||||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, node.id] });
|
|
||||||
onRefetch();
|
onRefetch();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -113,8 +111,8 @@ 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'] });
|
||||||
queryClient.invalidateQueries({ queryKey: ['image', node.id] });
|
queryClient.invalidateQueries({ queryKey: ['image'] });
|
||||||
onRefetch();
|
onRefetch();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -133,8 +131,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'] });
|
||||||
queryClient.invalidateQueries({ queryKey: ['folder', projectId, node?.id] });
|
|
||||||
|
|
||||||
onRefetch();
|
onRefetch();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user