[DetailPanel] Option component 폴더 및 파일 추가
This commit is contained in:
@@ -6,6 +6,7 @@ import { getMainCategoryDetail } from "../../actions/mainActions";
|
|||||||
import TBody from "../../components/TBody/TBody";
|
import TBody from "../../components/TBody/TBody";
|
||||||
import THeader from "../../components/THeader/THeader";
|
import THeader from "../../components/THeader/THeader";
|
||||||
import TPanel from "../../components/TPanel/TPanel";
|
import TPanel from "../../components/TPanel/TPanel";
|
||||||
|
import ProductOption from "./container/ProductOption";
|
||||||
import ProductThumbnail from "./container/ProductThumbnail";
|
import ProductThumbnail from "./container/ProductThumbnail";
|
||||||
import css from "./DetailPanel.module.less";
|
import css from "./DetailPanel.module.less";
|
||||||
|
|
||||||
@@ -38,6 +39,10 @@ export default function ItemDetail() {
|
|||||||
/>
|
/>
|
||||||
<TBody className={css.container} scrollable={false}>
|
<TBody className={css.container} scrollable={false}>
|
||||||
<ProductThumbnail productData={productData} />
|
<ProductThumbnail productData={productData} />
|
||||||
|
<ProductOption
|
||||||
|
selectedPatnrId={selectedPatnrId}
|
||||||
|
selectedPardtId={selectedPardtId}
|
||||||
|
/>
|
||||||
</TBody>
|
</TBody>
|
||||||
</TPanel>
|
</TPanel>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
export default function OptionCommon() {
|
||||||
|
return <div>OptionCommon</div>;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
import Spottable from "@enact/spotlight/Spottable";
|
||||||
|
|
||||||
|
const SpottableComponent = Spottable("div");
|
||||||
|
|
||||||
|
export default function OptionGroup() {
|
||||||
|
<div>
|
||||||
|
<p>description</p>
|
||||||
|
<SpottableComponent>{"item"}</SpottableComponent>
|
||||||
|
</div>;
|
||||||
|
return <div>OptionGroup</div>;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default function OptionHotel() {
|
||||||
|
return <div>OptionHotel</div>;
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
import React, { useEffect } from 'react';
|
||||||
|
|
||||||
|
import {
|
||||||
|
useDispatch,
|
||||||
|
useSelector,
|
||||||
|
} from 'react-redux';
|
||||||
|
|
||||||
|
import {
|
||||||
|
getProductGroup,
|
||||||
|
getProductOption,
|
||||||
|
} from '../../../actions/productActions';
|
||||||
|
import OptionGroup from '../components/optionTypes/OptionGroup';
|
||||||
|
import css from './ProductOption.module.less';
|
||||||
|
|
||||||
|
export default function ProductOption({ selectedPatnrId, selectedPardtId }) {
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
|
const productOpionInfos = useSelector((state) => state.product.prdtOptInfo);
|
||||||
|
const groupInfos = useSelector((state) => state.product.groupInfo);
|
||||||
|
|
||||||
|
console.log("# productOpionInfos", productOpionInfos);
|
||||||
|
console.log("# groupInfos", groupInfos);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
dispatch(
|
||||||
|
getProductOption({
|
||||||
|
patnrId: selectedPatnrId,
|
||||||
|
prdtId: selectedPardtId,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
dispatch(
|
||||||
|
getProductGroup({
|
||||||
|
patnrId: selectedPatnrId,
|
||||||
|
prdtId: selectedPardtId,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}, [dispatch]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div className={css.optionLayerTop}>
|
||||||
|
<div className={css.partner}>partner</div>
|
||||||
|
<div className={css.brandName}>brandName</div>
|
||||||
|
<div className={css.specialPrice}>specialPrice</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<OptionGroup />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user