playerPanel API연동 및 컴포넌트 구조분해
This commit is contained in:
@@ -1,23 +1,29 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import React, {
|
||||
useEffect,
|
||||
useState,
|
||||
} from 'react';
|
||||
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import {
|
||||
useDispatch,
|
||||
useSelector,
|
||||
} from 'react-redux';
|
||||
|
||||
import {
|
||||
getThemeCurationDetailInfo,
|
||||
getThemeHotelDetailInfo,
|
||||
} from "../../actions/homeActions";
|
||||
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 css from "./DetailPanel.module.less";
|
||||
import GroupProduct from "./GroupProduct/GroupProduct";
|
||||
import SingleProduct from "./SingleProduct/SingleProduct";
|
||||
import ThemeProduct from "./ThemeProduct/ThemeProduct";
|
||||
import UnableProduct from "./UnableProduct/UnableProduct";
|
||||
import YouMayLike from "./YouMayLike/YouMayLike";
|
||||
} from '../../actions/homeActions';
|
||||
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 css from './DetailPanel.module.less';
|
||||
import GroupProduct from './GroupProduct/GroupProduct';
|
||||
import SingleProduct from './SingleProduct/SingleProduct';
|
||||
import ThemeProduct from './ThemeProduct/ThemeProduct';
|
||||
import UnableProduct from './UnableProduct/UnableProduct';
|
||||
import YouMayLike from './YouMayLike/YouMayLike';
|
||||
|
||||
export default function ItemDetail() {
|
||||
const [selectedPatnrId, setSelectedPatnrId] = useState("");
|
||||
@@ -27,6 +33,7 @@ export default function ItemDetail() {
|
||||
const [selectedIndex, setSelectedIndex] = useState(0);
|
||||
|
||||
const productData = useSelector((state) => state.main.productData);
|
||||
const themeData = useSelector((state) => state.home.productData);
|
||||
const panels = useSelector((state) => state.panels.panels);
|
||||
const hotelData = useSelector((state) => state.home.hotelData);
|
||||
const productInfo = useSelector(
|
||||
@@ -91,6 +98,7 @@ export default function ItemDetail() {
|
||||
const onClick = () => {
|
||||
dispatch(popPanel());
|
||||
};
|
||||
|
||||
return (
|
||||
<TPanel isTabActivated={false}>
|
||||
<THeader
|
||||
@@ -98,7 +106,7 @@ export default function ItemDetail() {
|
||||
title={
|
||||
(selectedPrdtId && productData?.prdtNm) ||
|
||||
(themeType === "hotel" && hotelData?.hotelInfo.curationNm) ||
|
||||
(themeType === "theme" && productInfo[selectedIndex]?.prdtNm)
|
||||
(themeType === "theme" && themeData?.themeInfo[0]?.curationNm)
|
||||
}
|
||||
onBackButton
|
||||
onClick={onClick}
|
||||
|
||||
Reference in New Issue
Block a user