From 009c47d7f837d045722c3337b57676424f97d546 Mon Sep 17 00:00:00 2001 From: JunmanChoi Date: Fri, 20 Dec 2024 03:04:08 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EB=94=94=EB=B2=84=EA=B9=85=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/network/router/Router.js | 7 ++----- src/pages/app.js | 1 - src/stores/FeatureStore.js | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/network/router/Router.js b/src/network/router/Router.js index ecc095a7..30759bfc 100644 --- a/src/network/router/Router.js +++ b/src/network/router/Router.js @@ -60,8 +60,7 @@ class Router { } }; - navigate = (path, redirect) => { - console.log("redirect", redirect, path); + navigate = (path) => { if (this.isHash === true) { window.location.hash = path; } @@ -81,8 +80,6 @@ class Router { }; // popstate 발동 시 라우팅 해주는 함수(최초 인스턴스화 시에 이벤트 리스너로 등록) - // TO ASK : 예제 코드에서는 메서드로 선언 되어 있어, this바인딩을 해주는데, 그러한 점을 화살표 함수로 변경해 해결했음. - // 메서드 작성후 this바인딩을 해주는 이유가 무엇인지 궁금함. _handlePopState = () => { this.route(window.location.pathname); }; @@ -101,7 +98,7 @@ class Router { for (const guard of guards) { const redirectPath = guard(); if (redirectPath) { - this.navigate(redirectPath, true); + this.navigate(redirectPath); skip = true; return; } diff --git a/src/pages/app.js b/src/pages/app.js index 999be77a..e6c7904b 100644 --- a/src/pages/app.js +++ b/src/pages/app.js @@ -125,7 +125,6 @@ const MainPage = (dom, query) => { if (!query) { dom.innerHTML = render(); } else { - console.log(dom.querySelector(query), query); dom.querySelector(query).innerHTML = render(); } addEventListeners(); diff --git a/src/stores/FeatureStore.js b/src/stores/FeatureStore.js index 77b99e28..f2038bb6 100644 --- a/src/stores/FeatureStore.js +++ b/src/stores/FeatureStore.js @@ -15,7 +15,6 @@ class FeatureStore extends Store { if (feature.includes("/")) { feature = this._pathToFeature(feature); } - console.log(feature); this._setState({ feature }); };