DetailPanel 폴더구조변경
This commit is contained in:
@@ -2,24 +2,23 @@ import React, { useEffect, useState } from "react";
|
||||
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
import {
|
||||
getMainCategoryDetail,
|
||||
getMainYouMayLike,
|
||||
} from "../../actions/mainActions";
|
||||
import { getMainCategoryDetail } from "../../actions/mainActions";
|
||||
import { popPanel } from "../../actions/panelActions";
|
||||
import TBody from "../../components/TBody/TBody";
|
||||
import THeader from "../../components/THeader/THeader";
|
||||
import TPanel from "../../components/TPanel/TPanel";
|
||||
import ProductOption from "./container/ProductOption";
|
||||
import ProductThumbnail from "./container/ProductThumbnail";
|
||||
import ProductOption from "./components/ProductOption";
|
||||
import ProductThumbnail from "./components/ProductThumbnail";
|
||||
import SingleProduct from "./container/SingleProduct";
|
||||
import YouMayLike from "./container/YouMayLike";
|
||||
import css from "./DetailPanel.module.less";
|
||||
|
||||
export default function ItemDetail() {
|
||||
const [panelInfo, setPaneInfo] = useState();
|
||||
const data = useSelector((state) => state.main.productData);
|
||||
const productData = useSelector((state) => state.main.productData);
|
||||
const panels = useSelector((state) => state.panels.panels);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const getPanelInfo = () => {
|
||||
if (panels) {
|
||||
for (let i = 0; i < panels.length; i++) {
|
||||
@@ -29,7 +28,6 @@ export default function ItemDetail() {
|
||||
}
|
||||
}
|
||||
};
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(() => {
|
||||
getPanelInfo();
|
||||
@@ -50,17 +48,14 @@ export default function ItemDetail() {
|
||||
<TPanel isTabActivated={false}>
|
||||
<THeader
|
||||
className={css.header}
|
||||
title={data?.prdtNm}
|
||||
title={productData?.prdtNm}
|
||||
onBackButton
|
||||
onClick={onClick}
|
||||
/>
|
||||
<TBody className={css.container} scrollable={false}>
|
||||
<ProductThumbnail />
|
||||
<ProductOption
|
||||
<SingleProduct
|
||||
selectedPatnrId={panelInfo?.patnrId}
|
||||
selectedPardtId={panelInfo?.prdtId}
|
||||
// selectedPatnrId={1}
|
||||
// selectedPardtId={"A523924"}
|
||||
/>
|
||||
</TBody>
|
||||
<YouMayLike />
|
||||
|
||||
Reference in New Issue
Block a user