MainSlice적용

getSubCategory작업 관련하여 적용 및 오타수정.
This commit is contained in:
junghoon86.park
2024-01-29 09:52:46 +09:00
parent fa4798dd3e
commit e173f9f32f
4 changed files with 15 additions and 1 deletions

View File

@@ -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 <MainView />;

View File

@@ -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) => {

View File

@@ -34,7 +34,6 @@ export const getSubCategory = createAsyncThunk(
);
}
);
0;
const initialState = {
subCategoryData: {},

View File

@@ -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,
},
});