[HomePanel] 필요없는 코드 삭제 및 변경
- subcategory 필요없는 코드 제거. - popularshow부분 변경
This commit is contained in:
@@ -12,7 +12,7 @@ import css from "../PopularShow/PopularShow.module.less";
|
|||||||
|
|
||||||
const Container = SpotlightContainerDecorator(
|
const Container = SpotlightContainerDecorator(
|
||||||
{ enterTo: "last-focused" },
|
{ enterTo: "last-focused" },
|
||||||
"section"
|
"div"
|
||||||
);
|
);
|
||||||
|
|
||||||
const SpottableComponent = Spottable("li");
|
const SpottableComponent = Spottable("li");
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ const Container = SpotlightContainerDecorator(
|
|||||||
"div"
|
"div"
|
||||||
);
|
);
|
||||||
|
|
||||||
const SpottableComponent = Spottable("li");
|
|
||||||
const SubCategory = () => {
|
const SubCategory = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
@@ -29,7 +28,6 @@ const SubCategory = () => {
|
|||||||
const subCategoryData = useSelector(
|
const subCategoryData = useSelector(
|
||||||
(state) => state.main.subCategoryData.categoryItemInfos
|
(state) => state.main.subCategoryData.categoryItemInfos
|
||||||
);
|
);
|
||||||
const testchk = useSelector((state) => state);
|
|
||||||
const [currentLgCatCd, setCurrentLgCatCd] = useState();
|
const [currentLgCatCd, setCurrentLgCatCd] = useState();
|
||||||
|
|
||||||
const handleCategoryNav = (lgCatCd) => {
|
const handleCategoryNav = (lgCatCd) => {
|
||||||
@@ -45,20 +43,10 @@ const SubCategory = () => {
|
|||||||
const initialLgCatCd = categoryInfos[0].lgCatCd;
|
const initialLgCatCd = categoryInfos[0].lgCatCd;
|
||||||
setCurrentLgCatCd(initialLgCatCd);
|
setCurrentLgCatCd(initialLgCatCd);
|
||||||
}
|
}
|
||||||
getSubCategory({
|
|
||||||
lgCatCd: currentLgCatCd,
|
|
||||||
patnrIdList: null,
|
|
||||||
pageSize: null,
|
|
||||||
tabType: "CAT00102",
|
|
||||||
filterType: "CAT00202",
|
|
||||||
});
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currentLgCatCd) {
|
if (currentLgCatCd) {
|
||||||
dispatch(
|
|
||||||
getOnSaleInfo({ categoryIncFlag: "Y", lgCatCd: currentLgCatCd })
|
|
||||||
);
|
|
||||||
dispatch(
|
dispatch(
|
||||||
getSubCategory({
|
getSubCategory({
|
||||||
lgCatCd: currentLgCatCd,
|
lgCatCd: currentLgCatCd,
|
||||||
@@ -79,7 +67,6 @@ const SubCategory = () => {
|
|||||||
onCategoryNavClick={handleCategoryNav}
|
onCategoryNavClick={handleCategoryNav}
|
||||||
type="home"
|
type="home"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TGrid type="home">
|
<TGrid type="home">
|
||||||
{subCategoryData &&
|
{subCategoryData &&
|
||||||
subCategoryData.slice(0, 9).map((item) => {
|
subCategoryData.slice(0, 9).map((item) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user