From bfa8a799eb60e3fda8519879dbdecc8976a3446c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Tue, 8 Oct 2024 13:44:49 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Fix:=EC=BF=BC=EB=A6=AC=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/WorkspaceSidebar/ProjectContextMenu.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx b/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx index 403f75f..97b468c 100644 --- a/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx +++ b/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx @@ -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(); }, From f92d62e4c398f711055d578e47cf4314fbc2585d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Tue, 8 Oct 2024 13:50:23 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Fix:=20=EC=BB=A8=ED=85=8D=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EB=A9=94=EB=89=B4=20=EC=BF=BC=EB=A6=AC=ED=82=A4=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94=20=EA=B4=80=EB=A0=A8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkspaceSidebar/ProjectContextMenu.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx b/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx index a8d95ce..45b9215 100644 --- a/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx +++ b/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx @@ -87,8 +87,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc }, { onSuccess: () => { - queryClient.invalidateQueries({ queryKey: ['folder', projectId, folderId] }); - queryClient.invalidateQueries({ queryKey: ['folder', projectId, node.id] }); + queryClient.invalidateQueries({ queryKey: ['folder'] }); onRefetch(); }, } @@ -102,7 +101,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc { projectId, folderId: node.id, memberId }, { onSuccess: () => { - queryClient.invalidateQueries({ queryKey: ['folder', projectId] }); + queryClient.invalidateQueries({ queryKey: ['folder'] }); onRefetch(); }, } @@ -112,8 +111,8 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc { projectId, folderId, imageId: node.id }, { onSuccess: () => { - queryClient.invalidateQueries({ queryKey: ['folder', projectId] }); - queryClient.invalidateQueries({ queryKey: ['image', node.id] }); + queryClient.invalidateQueries({ queryKey: ['folder'] }); + queryClient.invalidateQueries({ queryKey: ['image'] }); onRefetch(); }, } @@ -132,7 +131,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc { onSuccess: () => { console.log(folderId, node?.id); - queryClient.invalidateQueries({ queryKey: ['folder', projectId] }); + queryClient.invalidateQueries({ queryKey: ['folder'] }); onRefetch(); }, From 07979296cf85df265e2db994ed047568bad02886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Tue, 8 Oct 2024 14:25:33 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Fix:=20=EB=A6=AC=EB=B7=B0=EC=9A=94=EC=B2=AD?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20=ED=97=A4?= =?UTF-8?q?=EB=8D=94=20=EC=9D=B4=EB=8F=99=ED=95=A0=20=EB=95=8C=20=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/Header/WorkspaceNavigation.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Header/WorkspaceNavigation.tsx b/frontend/src/components/Header/WorkspaceNavigation.tsx index 80df23e..a80fe05 100644 --- a/frontend/src/components/Header/WorkspaceNavigation.tsx +++ b/frontend/src/components/Header/WorkspaceNavigation.tsx @@ -19,7 +19,9 @@ export default function WorkspaceNavigation() { const workspaces = workspacesResponse?.workspaceResponses || []; 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) { return
;