From e173f9f32fe228295ba98dc7c4654c9f12376d55 Mon Sep 17 00:00:00 2001 From: "junghoon86.park" Date: Mon, 29 Jan 2024 09:52:46 +0900 Subject: [PATCH] =?UTF-8?q?MainSlice=EC=A0=81=EC=9A=A9=20getSubCategory?= =?UTF-8?q?=EC=9E=91=EC=97=85=20=EA=B4=80=EB=A0=A8=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=20=EB=B0=8F=20=EC=98=A4=ED=83=80=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- com.twin.app.shoptime/src/App/App.js | 10 ++++++++++ com.twin.app.shoptime/src/api/apiConfig.js | 3 +++ com.twin.app.shoptime/src/features/main/mainSlice.js | 1 - com.twin.app.shoptime/src/store/store.js | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/com.twin.app.shoptime/src/App/App.js b/com.twin.app.shoptime/src/App/App.js index d3eaf2ef..5b7149f8 100644 --- a/com.twin.app.shoptime/src/App/App.js +++ b/com.twin.app.shoptime/src/App/App.js @@ -9,6 +9,7 @@ import { getAuthenticationCode } from "../features/device/deviceSlice"; import { getHomeMenu } from "../features/home/homeSlice"; import { getMyRecommandedKeyword } from "../features/mypage/myPageSlice"; import { getOnSaleInfo } from "../features/onSale/onSaleSlice"; +import { getSubCategory } from "../features/main/mainSlice"; import MainView from "../views/MainView/MainView"; import css from "./App.module.less"; @@ -21,6 +22,15 @@ function AppBase(props) { dispatch(getOnSaleInfo({ categoryIncFlag: "Y", lgCatCd: "" })); dispatch(getBrandList()); dispatch(getMyRecommandedKeyword()); + dispatch( + getSubCategory({ + lgCatCd: "1000", + patnrIdList: "", + pageSize: "", + tabType: "", + filterType: "", + }) + ); }, [dispatch]); return ; diff --git a/com.twin.app.shoptime/src/api/apiConfig.js b/com.twin.app.shoptime/src/api/apiConfig.js index 17232d5c..8ec7b9cb 100644 --- a/com.twin.app.shoptime/src/api/apiConfig.js +++ b/com.twin.app.shoptime/src/api/apiConfig.js @@ -30,6 +30,9 @@ export const URLS = { //my-page controller GET_MY_RECOMMANDED_KEYWORD: "/lgsp/v1/mypage/reckeyword.lge", + + //main controller + GET_SUB_CATEGORY: "/lgsp/v1/main/subcategory.lge", }; export const getUrl = (endStr) => { diff --git a/com.twin.app.shoptime/src/features/main/mainSlice.js b/com.twin.app.shoptime/src/features/main/mainSlice.js index 5a84c064..fc43af1e 100644 --- a/com.twin.app.shoptime/src/features/main/mainSlice.js +++ b/com.twin.app.shoptime/src/features/main/mainSlice.js @@ -34,7 +34,6 @@ export const getSubCategory = createAsyncThunk( ); } ); -0; const initialState = { subCategoryData: {}, diff --git a/com.twin.app.shoptime/src/store/store.js b/com.twin.app.shoptime/src/store/store.js index 5f7d3c55..a0354a6a 100644 --- a/com.twin.app.shoptime/src/store/store.js +++ b/com.twin.app.shoptime/src/store/store.js @@ -8,6 +8,7 @@ import homeReducer from "../features/home/homeSlice"; import myPageReducer from "../features/mypage/myPageSlice"; import onSaleReducer from "../features/onSale/onSaleSlice"; import panelsReducer from "../features/panels/panelsSlice"; +import mainReducer from "../features/main/mainSlice"; export const store = configureStore({ reducer: { @@ -19,5 +20,6 @@ export const store = configureStore({ onSale: onSaleReducer, brand: brandReducer, myPage: myPageReducer, + main: mainReducer, }, });