From e1d3ea338b920e708f20e76659d5f4744572b256 Mon Sep 17 00:00:00 2001 From: Jaeha Lee Date: Sun, 5 Mar 2023 14:12:47 +0900 Subject: [PATCH] =?UTF-8?q?Refactor:=20login,=20productDetail,=20signupPag?= =?UTF-8?q?e=ED=8C=8C=EC=9D=BC=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ts/main.ts | 6 +++--- src/ts/page/cartPage/cartPage.ts | 2 +- src/ts/page/detailOrderHistoryPage/detailOrderHistory.ts | 2 +- src/ts/page/{login.ts => loginPage.ts} | 0 src/ts/page/mypage.ts | 2 +- src/ts/page/mypage/account.ts | 2 +- src/ts/page/mypage/editPersonalInfo.ts | 2 +- src/ts/page/mypage/orderhistory.ts | 2 +- .../productDetailPage.ts} | 2 +- src/ts/page/{signup.ts => signupPage.ts} | 2 +- src/ts/page/wishListPage/wishListPage.ts | 4 ++-- src/ts/utils/render.ts | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) rename src/ts/page/{login.ts => loginPage.ts} (100%) rename src/ts/page/{productDetail/productDetail.ts => productDetailPage/productDetailPage.ts} (99%) rename src/ts/page/{signup.ts => signupPage.ts} (99%) diff --git a/src/ts/main.ts b/src/ts/main.ts index e2bdcb6..08cd1f6 100644 --- a/src/ts/main.ts +++ b/src/ts/main.ts @@ -2,13 +2,13 @@ import Navigo from 'navigo'; import { $ } from './utils/dom'; import { handleMyPage } from './page/mypage'; import { handleAccountPage } from './page/mypage/account'; -import { handleLoginPage } from './page/login'; -import { handleSignupPage } from './page/signup'; +import { handleLoginPage } from './page/loginPage'; +import { handleSignupPage } from './page/signupPage'; import { handleCartPage } from './page/cartPage/cartPage'; import { handleMainPage } from './page/mainPage/mainPage'; import { handleCategoryPage } from './page/categoryPage/categoryPage'; import { handleSearchPage } from './page/searchPage/searchPage'; -import { handleDetailProductPage } from './page/productDetail/productDetail'; +import { handleDetailProductPage } from './page/productDetailPage/productDetailPage'; import { handleWishListPage } from './page/wishListPage/wishListPage'; import { handlePaymentPage } from './page/paymentPage/paymentPage'; import { handleOrderHistoryPage } from './page/mypage/orderhistory'; diff --git a/src/ts/page/cartPage/cartPage.ts b/src/ts/page/cartPage/cartPage.ts index b4384bb..0058b9a 100644 --- a/src/ts/page/cartPage/cartPage.ts +++ b/src/ts/page/cartPage/cartPage.ts @@ -4,7 +4,7 @@ import { router } from '../../main'; import { $ } from '../../utils/dom'; -import { updateInfo } from '../productDetail/productDetail'; +import { updateInfo } from '../productDetailPage/productDetailPage'; import { shoppingCartStore } from '../../store/shoppingCartStore'; import { cartSVG } from '../../importIMGFiles'; import { renderPage } from '../../utils/render'; diff --git a/src/ts/page/detailOrderHistoryPage/detailOrderHistory.ts b/src/ts/page/detailOrderHistoryPage/detailOrderHistory.ts index 4cb2771..48d78bc 100644 --- a/src/ts/page/detailOrderHistoryPage/detailOrderHistory.ts +++ b/src/ts/page/detailOrderHistoryPage/detailOrderHistory.ts @@ -5,7 +5,7 @@ import { $ } from '../../utils/dom'; import { renderPage } from '../../utils/render'; import { getDetailOrderProduct } from '../../api'; import { formatDate } from '../../utils/format'; -import { getLoginStatus, showAlertPlzLogin } from '../login'; +import { getLoginStatus, showAlertPlzLogin } from '../loginPage'; import { htmlMypage_Nav } from '../mypage'; import { router } from '../../main'; diff --git a/src/ts/page/login.ts b/src/ts/page/loginPage.ts similarity index 100% rename from src/ts/page/login.ts rename to src/ts/page/loginPage.ts diff --git a/src/ts/page/mypage.ts b/src/ts/page/mypage.ts index 3ae591c..eb5c9ea 100644 --- a/src/ts/page/mypage.ts +++ b/src/ts/page/mypage.ts @@ -3,7 +3,7 @@ import { chevronrightSVG } from '../importIMGFiles'; import { router } from '../main'; import { $$ } from '../utils/dom'; import { renderPage } from '../utils/render'; -import { getLoginStatus, showAlertPlzLogin } from './login'; +import { getLoginStatus, showAlertPlzLogin } from './loginPage'; let navliList; /** HTML : mypage nav 목록 */ diff --git a/src/ts/page/mypage/account.ts b/src/ts/page/mypage/account.ts index a2315bc..b8ac0bf 100644 --- a/src/ts/page/mypage/account.ts +++ b/src/ts/page/mypage/account.ts @@ -1,7 +1,7 @@ import { $ } from '../../utils/dom'; import { renderPage } from '../../utils/render'; import { htmlMypage_Nav } from '../mypage'; -import { getLoginStatus, showAlertPlzLogin } from '../login'; +import { getLoginStatus, showAlertPlzLogin } from '../loginPage'; import { router } from '../../main'; import { getBankList, diff --git a/src/ts/page/mypage/editPersonalInfo.ts b/src/ts/page/mypage/editPersonalInfo.ts index f938390..f7fa120 100644 --- a/src/ts/page/mypage/editPersonalInfo.ts +++ b/src/ts/page/mypage/editPersonalInfo.ts @@ -1,7 +1,7 @@ import { $ } from '../../utils/dom'; import { router } from '../../main'; import { renderPage } from '../../utils/render'; -import { getLoginStatus, showAlertPlzLogin } from '../login'; +import { getLoginStatus, showAlertPlzLogin } from '../loginPage'; import { htmlMypage_Nav, resetNavbarActive } from '../mypage'; import { authorization, personalInfoLogin, submitChangeInfo } from '../../api'; import { Authorization } from '../../interface/index'; diff --git a/src/ts/page/mypage/orderhistory.ts b/src/ts/page/mypage/orderhistory.ts index ba3245b..f3476f2 100644 --- a/src/ts/page/mypage/orderhistory.ts +++ b/src/ts/page/mypage/orderhistory.ts @@ -10,7 +10,7 @@ import { import { formatDate } from '../../utils/format'; import { htmlMypage_Nav, resetNavbarActive } from '../mypage'; import { router } from '../../main'; -import { getLoginStatus, showAlertPlzLogin } from '../login'; +import { getLoginStatus, showAlertPlzLogin } from '../loginPage'; import { GetAllTransactionsInterface } from '../../interface/index'; import { toggleLoadingSpinner } from '../../utils/loading'; diff --git a/src/ts/page/productDetail/productDetail.ts b/src/ts/page/productDetailPage/productDetailPage.ts similarity index 99% rename from src/ts/page/productDetail/productDetail.ts rename to src/ts/page/productDetailPage/productDetailPage.ts index 4f4d893..98a2272 100644 --- a/src/ts/page/productDetail/productDetail.ts +++ b/src/ts/page/productDetailPage/productDetailPage.ts @@ -9,7 +9,7 @@ import { getDetailProduct } from '../../api'; import { wishListStore } from '../../store/wishListStore'; import { shoppingCartStore } from '../../store/shoppingCartStore'; import { recentViewStore } from '../../store/recentViewStore'; -import { renderInitHeaderLogin } from '../login'; +import { renderInitHeaderLogin } from '../loginPage'; import { formatPrice } from '../../utils/format'; import { countQtyInCart, countQtyInWishlist } from '../mainPage/mainPage'; import { WishListStore } from '../../interface/store'; diff --git a/src/ts/page/signup.ts b/src/ts/page/signupPage.ts similarity index 99% rename from src/ts/page/signup.ts rename to src/ts/page/signupPage.ts index f853fc9..7ac8b90 100644 --- a/src/ts/page/signup.ts +++ b/src/ts/page/signupPage.ts @@ -1,5 +1,5 @@ import { $ } from '../utils/dom'; -import { htmlHeaderLogin } from './login'; +import { htmlHeaderLogin } from './loginPage'; import { router } from '../main'; import { renderPage } from '../utils/render'; import { getUserList, signup } from '../api'; diff --git a/src/ts/page/wishListPage/wishListPage.ts b/src/ts/page/wishListPage/wishListPage.ts index 7062474..72430a2 100644 --- a/src/ts/page/wishListPage/wishListPage.ts +++ b/src/ts/page/wishListPage/wishListPage.ts @@ -5,13 +5,13 @@ import { $ } from '../../utils/dom'; import { renderPage } from '../../utils/render'; import { shoppingCart, hearted } from '../../importIMGFiles'; -import { storeCart } from '../productDetail/productDetail'; +import { storeCart } from '../productDetailPage/productDetailPage'; import { wishListStore } from '../../store/wishListStore'; import { shoppingCartStore } from '../../store/shoppingCartStore'; import { htmlMypage_Nav, resetNavbarActive } from '../mypage'; import { router } from '../../main'; import { countQtyInCart, countQtyInWishlist } from '../mainPage/mainPage'; -import { getLoginStatus, showAlertPlzLogin } from '../login'; +import { getLoginStatus, showAlertPlzLogin } from '../loginPage'; import { WishListStore, WishListStoreValue } from '../../interface/store'; /** 찜한상품 제목, ul 태그 템플릿 삽입 */ diff --git a/src/ts/utils/render.ts b/src/ts/utils/render.ts index 9a712bc..7a3c31a 100644 --- a/src/ts/utils/render.ts +++ b/src/ts/utils/render.ts @@ -1,4 +1,4 @@ -import { renderInitHeaderLogin } from '../page/login'; +import { renderInitHeaderLogin } from '../page/loginPage'; import { $ } from './dom'; /** Navigo innerHTML template */