From d620500efdcec398191b7d0805585876e3c79d10 Mon Sep 17 00:00:00 2001 From: "younghoon100.park" Date: Thu, 1 Feb 2024 14:57:22 +0900 Subject: [PATCH] =?UTF-8?q?[OnSalePanel]=20=20TopButton=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Detail Notes : 1. TopButton component 반영 --- .../src/views/OnSalePanel/OnSalePanel.jsx | 61 ++++++++++++------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/com.twin.app.shoptime/src/views/OnSalePanel/OnSalePanel.jsx b/com.twin.app.shoptime/src/views/OnSalePanel/OnSalePanel.jsx index 7d774d74..bf77df1a 100644 --- a/com.twin.app.shoptime/src/views/OnSalePanel/OnSalePanel.jsx +++ b/com.twin.app.shoptime/src/views/OnSalePanel/OnSalePanel.jsx @@ -1,14 +1,23 @@ -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 { getOnSaleInfo } from "../../actions/onSaleActions"; -import TBody from "../../components/TBody/TBody"; -import TItemCard from "../../components/TItemCard/TItemCard"; -import TPanel from "../../components/TPanel/TPanel"; -import CategoryNav from "../OnSalePanel/CategoryNav/CategoryNav"; -import OnSaleProductsGrid from "../OnSalePanel/OnSaleProductsGrid/OnSaleProductsGrid"; -import css from "./OnSalePanel.module.less"; +import { getOnSaleInfo } from '../../actions/onSaleActions'; +import TBody from '../../components/TBody/TBody'; +import TItemCard from '../../components/TItemCard/TItemCard'; +import TopButton from '../../components/TopButton/TopButton'; +import TPanel from '../../components/TPanel/TPanel'; +import { SpotlightIds } from '../../utils/SpotlightIds'; +import CategoryNav from '../OnSalePanel/CategoryNav/CategoryNav'; +import OnSaleProductsGrid + from '../OnSalePanel/OnSaleProductsGrid/OnSaleProductsGrid'; +import css from './OnSalePanel.module.less'; export default function OnSalePanel() { const dispatch = useDispatch(); @@ -20,7 +29,9 @@ export default function OnSalePanel() { const [currentLgCatCd, setCurrentLgCatCd] = useState(); - const handleCategoryNav = (lgCatCd) => { + const targetId = saleInfos[0].saleProductInfos[0].prdtId; + + const handleCategoryNavClick = (lgCatCd) => { if (currentLgCatCd === lgCatCd) { return; } @@ -48,28 +59,32 @@ export default function OnSalePanel() { {saleInfos && saleInfos.map(({ saleNm, saleProductInfos }) => { return ( - {saleProductInfos.map((saleProduct) => { - return ( - - ); - })} + {saleProductInfos.map( + ({ imgUrl, prdtId, prdtNm, priceInfo }) => { + return ( + + ); + } + )} ); })} + + );