From ca834ee8d200bc1b629d018b0b4d7e0921f5f357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9D=80=EC=86=94?= Date: Sun, 26 Dec 2021 15:43:09 +0000 Subject: [PATCH 1/2] Update index.js --- frontend/static/js/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/static/js/index.js b/frontend/static/js/index.js index 44c55fd..e7ef939 100644 --- a/frontend/static/js/index.js +++ b/frontend/static/js/index.js @@ -48,9 +48,9 @@ const router = async () => { (potentialMatch) => potentialMatch.result !== null ); - if (!match) { + if (!match || localStorage.getItem("token") === null) { match = { - route: localStorage.getItem("token") ? routes[4] : routes[0], + route: routes[0], result: [location.pathname], }; } From 5d728d1312205b680fbf7c271f7723454c93a9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9D=80=EC=86=94?= Date: Mon, 27 Dec 2021 01:50:08 +0000 Subject: [PATCH 2/2] Update index.js --- frontend/static/js/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/static/js/index.js b/frontend/static/js/index.js index e7ef939..5f5af01 100644 --- a/frontend/static/js/index.js +++ b/frontend/static/js/index.js @@ -48,7 +48,12 @@ const router = async () => { (potentialMatch) => potentialMatch.result !== null ); - if (!match || localStorage.getItem("token") === null) { + if ( + !match || + (localStorage.getItem("token") === null && + match.route.path !== "/signup" && + match.route.path !== "/find") + ) { match = { route: routes[0], result: [location.pathname],