From 2a4effff47306634fc14a8d36aa952afd6f8dbcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Fri, 13 Sep 2024 08:21:09 +0900 Subject: [PATCH] =?UTF-8?q?Refator:=20=EC=9B=8C=ED=81=AC=EC=8A=A4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=8A=A4(=EB=A0=88=EC=9D=B4=EB=B8=94=EB=A7=81=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=EA=B3=B5=EA=B0=84)=20=20=EB=9D=BC=EC=9A=B0?= =?UTF-8?q?=ED=84=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/router/index.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/src/router/index.tsx b/frontend/src/router/index.tsx index 8aa87b6..1a3a054 100644 --- a/frontend/src/router/index.tsx +++ b/frontend/src/router/index.tsx @@ -13,8 +13,9 @@ import { Navigate } from 'react-router-dom'; export const webPath = { home: () => '/', browse: () => '/browse', - workspace: () => '/workspace', - admin: (id: string) => `/admin/${id}`, + workspace: (workspaceId: string, projectId?: string) => + projectId ? `/workspace/${workspaceId}/project/${projectId}` : `/workspace/${workspaceId}`, + admin: (workspaceId: string) => `/admin/${workspaceId}`, oauthCallback: () => '/redirect/oauth2', }; @@ -44,17 +45,21 @@ const router = createBrowserRouter([ ], }, { - path: webPath.workspace(), + path: '/workspace/:workspaceId', element: , children: [ { - index: true, + path: '', element:
workspace
, }, + { + path: 'project/:projectId', + element:
workspace project
, + }, ], }, { - path: webPath.admin(':id'), + path: webPath.admin(':workspaceId'), element: , children: [ {