탭 레이아웃 기획변경 원복 및 호텔테마 그리드리스트 적용
This commit is contained in:
@@ -1,23 +1,17 @@
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
import { getProductCouponSearch } from "../../actions/couponActions";
|
||||
import {
|
||||
getThemeCurationDetailInfo,
|
||||
getThemeHotelDetailInfo,
|
||||
} from "../../actions/homeActions";
|
||||
import {
|
||||
getMainCategoryDetail,
|
||||
getMyFavoriteFlag,
|
||||
} from "../../actions/mainActions";
|
||||
import { getMainCategoryDetail } from "../../actions/mainActions";
|
||||
import { popPanel } from "../../actions/panelActions";
|
||||
import { getProductGroup } from "../../actions/productActions";
|
||||
import TBody from "../../components/TBody/TBody";
|
||||
import THeader from "../../components/THeader/THeader";
|
||||
import TPanel from "../../components/TPanel/TPanel";
|
||||
import ProductOption from "./components/ProductOption";
|
||||
import ProductThumbnail from "./components/ProductThumbnail";
|
||||
import GroupProduct from "./container/GroupProduct";
|
||||
import SingleProduct from "./container/SingleProduct";
|
||||
import ThemeProduct from "./container/ThemeProduct";
|
||||
@@ -33,18 +27,11 @@ export default function ItemDetail() {
|
||||
const productData = useSelector((state) => state.main.productData);
|
||||
const panels = useSelector((state) => state.panels.panels);
|
||||
const groupInfos = useSelector((state) => state.product.groupInfo);
|
||||
const themeCurationDetailInfoData = useSelector(
|
||||
(state) => state.home.themeCurationDetailInfoData
|
||||
);
|
||||
const themeCurationHotelDetailData = useSelector(
|
||||
(state) => state.home.themeCurationHotelDetailData
|
||||
);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const getPanelInfo = () => {
|
||||
if (panels) {
|
||||
console.log("#panels", panels);
|
||||
for (let i = 0; i < panels.length; i++) {
|
||||
if (panels[i].name === "detailpanel") {
|
||||
setSelectedPatnrId(panels[i].panelInfo.patnrId);
|
||||
@@ -58,15 +45,9 @@ export default function ItemDetail() {
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
console.log("#Detail", themeCurationDetailInfoData);
|
||||
console.log("#Hotel", themeCurationHotelDetailData);
|
||||
}, [themeCurationDetailInfoData, themeCurationHotelDetailData]);
|
||||
|
||||
useEffect(() => {
|
||||
getPanelInfo();
|
||||
|
||||
console.log("#selectedPrdtId", selectedPrdtId);
|
||||
dispatch(
|
||||
getThemeCurationDetailInfo({
|
||||
patnrId: selectedPatnrId,
|
||||
@@ -130,13 +111,7 @@ export default function ItemDetail() {
|
||||
)}
|
||||
|
||||
{/* 테마그룹상품 영역*/}
|
||||
{(themeCurationHotelDetailData || themeCurationDetailInfoData) &&
|
||||
!selectedPrdtId && (
|
||||
<ThemeProduct
|
||||
selectedPatnrId={selectedPatnrId}
|
||||
selectedCurationId={selectedCurationId}
|
||||
/>
|
||||
)}
|
||||
{!selectedPrdtId && <ThemeProduct />}
|
||||
</TBody>
|
||||
<YouMayLike />
|
||||
</TPanel>
|
||||
|
||||
Reference in New Issue
Block a user