[api호출부분 변경]app -> homepanel

- getHomeLayout,getHomeMainContents
 - getBestSeller,getSubCategory
 - getTop20Show
This commit is contained in:
junghoon86.park
2024-03-29 13:03:53 +09:00
parent 5638a5a5f9
commit 5e79920d74
2 changed files with 20 additions and 17 deletions

View File

@@ -13,16 +13,12 @@ import {
} from "../actions/commonActions";
import { getAuthenticationCode } from "../actions/deviceActions";
import {
getHomeLayout,
getHomeMainContents,
getHomeMenu,
getHomeTerms,
getThemeCurationInfo,
} from "../actions/homeActions";
import { getSubCategory, getTop20Show } from "../actions/mainActions";
import { getMyRecommandedKeyword } from "../actions/myPageActions";
import { pushPanel } from "../actions/panelActions";
import { getBestSeller } from "../actions/productActions";
import usePrevious from "../hooks/usePrevious";
import { lunaTest } from "../lunaSend/lunaTest";
import * as Config from "../utils/Config";
@@ -60,20 +56,9 @@ function AppBase(props) {
}
dispatch(getHomeMenu());
dispatch(getHomeLayout());
dispatch(getHomeMainContents());
dispatch(getMyRecommandedKeyword());
dispatch(getBestSeller());
dispatch(
getSubCategory({
lgCatCd: "1017", //LG Electronics Base
patnrIdList: null,
pageSize: null,
tabType: null,
filterType: null,
})
);
dispatch(getTop20Show());
dispatch(getThemeCurationInfo());
}
//todo deeplink

View File

@@ -16,7 +16,10 @@ import {
setHidePopup,
setShowPopup,
} from "../../actions/commonActions";
import { getHomeLayout, getHomeMainContents } from "../../actions/homeActions";
import { getSubCategory, getTop20Show } from "../../actions/mainActions";
import { getOnSaleInfo } from "../../actions/onSaleActions";
import { getBestSeller } from "../../actions/productActions";
import TBody from "../../components/TBody/TBody";
import TButton, { TYPES } from "../../components/TButton/TButton";
import TPanel from "../../components/TPanel/TPanel";
@@ -52,6 +55,21 @@ const hasTemplateCodeWithValue = (array, value) =>
export default function HomePanel({ isOnTop }) {
const dispatch = useDispatch();
useEffect(() => {
dispatch(getHomeLayout());
dispatch(getHomeMainContents());
dispatch(getBestSeller());
dispatch(
getSubCategory({
lgCatCd: "1017", //LG Electronics Base
pageSize: 10,
tabType: "CAT00102",
filterType: "CAT00201",
})
); //
dispatch(getTop20Show());
}, [dispatch]);
const { getScrollTo, scrollTop } = useScrollTo();
useDebugKey({ isLandingPage: true });