diff --git a/frontend/static/js/index.js b/frontend/static/js/index.js index 44c55fd..5f5af01 100644 --- a/frontend/static/js/index.js +++ b/frontend/static/js/index.js @@ -48,9 +48,14 @@ const router = async () => { (potentialMatch) => potentialMatch.result !== null ); - if (!match) { + if ( + !match || + (localStorage.getItem("token") === null && + match.route.path !== "/signup" && + match.route.path !== "/find") + ) { match = { - route: localStorage.getItem("token") ? routes[4] : routes[0], + route: routes[0], result: [location.pathname], }; }