MainSlice적용
getSubCategory작업 관련하여 적용 및 오타수정.
This commit is contained in:
@@ -9,6 +9,7 @@ import { getAuthenticationCode } from "../features/device/deviceSlice";
|
|||||||
import { getHomeMenu } from "../features/home/homeSlice";
|
import { getHomeMenu } from "../features/home/homeSlice";
|
||||||
import { getMyRecommandedKeyword } from "../features/mypage/myPageSlice";
|
import { getMyRecommandedKeyword } from "../features/mypage/myPageSlice";
|
||||||
import { getOnSaleInfo } from "../features/onSale/onSaleSlice";
|
import { getOnSaleInfo } from "../features/onSale/onSaleSlice";
|
||||||
|
import { getSubCategory } from "../features/main/mainSlice";
|
||||||
import MainView from "../views/MainView/MainView";
|
import MainView from "../views/MainView/MainView";
|
||||||
import css from "./App.module.less";
|
import css from "./App.module.less";
|
||||||
|
|
||||||
@@ -21,6 +22,15 @@ function AppBase(props) {
|
|||||||
dispatch(getOnSaleInfo({ categoryIncFlag: "Y", lgCatCd: "" }));
|
dispatch(getOnSaleInfo({ categoryIncFlag: "Y", lgCatCd: "" }));
|
||||||
dispatch(getBrandList());
|
dispatch(getBrandList());
|
||||||
dispatch(getMyRecommandedKeyword());
|
dispatch(getMyRecommandedKeyword());
|
||||||
|
dispatch(
|
||||||
|
getSubCategory({
|
||||||
|
lgCatCd: "1000",
|
||||||
|
patnrIdList: "",
|
||||||
|
pageSize: "",
|
||||||
|
tabType: "",
|
||||||
|
filterType: "",
|
||||||
|
})
|
||||||
|
);
|
||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
return <MainView />;
|
return <MainView />;
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ export const URLS = {
|
|||||||
|
|
||||||
//my-page controller
|
//my-page controller
|
||||||
GET_MY_RECOMMANDED_KEYWORD: "/lgsp/v1/mypage/reckeyword.lge",
|
GET_MY_RECOMMANDED_KEYWORD: "/lgsp/v1/mypage/reckeyword.lge",
|
||||||
|
|
||||||
|
//main controller
|
||||||
|
GET_SUB_CATEGORY: "/lgsp/v1/main/subcategory.lge",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getUrl = (endStr) => {
|
export const getUrl = (endStr) => {
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ export const getSubCategory = createAsyncThunk(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
0;
|
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
subCategoryData: {},
|
subCategoryData: {},
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import homeReducer from "../features/home/homeSlice";
|
|||||||
import myPageReducer from "../features/mypage/myPageSlice";
|
import myPageReducer from "../features/mypage/myPageSlice";
|
||||||
import onSaleReducer from "../features/onSale/onSaleSlice";
|
import onSaleReducer from "../features/onSale/onSaleSlice";
|
||||||
import panelsReducer from "../features/panels/panelsSlice";
|
import panelsReducer from "../features/panels/panelsSlice";
|
||||||
|
import mainReducer from "../features/main/mainSlice";
|
||||||
|
|
||||||
export const store = configureStore({
|
export const store = configureStore({
|
||||||
reducer: {
|
reducer: {
|
||||||
@@ -19,5 +20,6 @@ export const store = configureStore({
|
|||||||
onSale: onSaleReducer,
|
onSale: onSaleReducer,
|
||||||
brand: brandReducer,
|
brand: brandReducer,
|
||||||
myPage: myPageReducer,
|
myPage: myPageReducer,
|
||||||
|
main: mainReducer,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user