From 39fe396d606297d7c987c4aa2aa926c3816ac3e5 Mon Sep 17 00:00:00 2001 From: "junghoon86.park" Date: Tue, 30 Jan 2024 15:48:07 +0900 Subject: [PATCH] =?UTF-8?q?-=20=EB=A9=94=EC=9D=B8=20bestseller=EC=AA=BD=20?= =?UTF-8?q?=EA=B8=88=EC=95=A1=ED=91=9C=EC=8B=9C=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20-=20mainSlice=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=98=A4=EA=B8=B0=EC=9E=85=20=EC=88=98=EC=A0=95=20-=20onsale,p?= =?UTF-8?q?opularshow=EB=B6=80=EB=B6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/TItemCard/TItemCard.jsx | 7 ++++++- .../src/components/TItemCard/TItemCard.module.less | 2 +- com.twin.app.shoptime/src/features/main/mainSlice.js | 2 +- .../src/views/HomePanel/BestSeller/BestSeller.jsx | 11 +++-------- .../src/views/HomePanel/OnSale/OnSale.jsx | 12 +++++------- .../src/views/HomePanel/PopularShow/PopularShow.jsx | 12 +++++++++--- .../src/views/HomePanel/SubCategory/SubCategory.jsx | 7 ++++--- 7 files changed, 29 insertions(+), 24 deletions(-) diff --git a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx index 5d9ed629..f26e4e9b 100644 --- a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx +++ b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx @@ -28,6 +28,7 @@ export default memo(function ProductCard({ soldoutFlag, type = TYPE_VERTICAL, accType = false, + offerInfo, ...rest }) { const handleClick = useCallback( @@ -83,7 +84,11 @@ export default memo(function ProductCard({

{productName}

- {discountRate ? discountedPrice : originalPrice} + {offerInfo != "" + ? offerInfo + : discountRate + ? discountedPrice + : originalPrice} {discountRate && ( {accType ? originalPrice : discountRate} )} diff --git a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.module.less b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.module.less index 33a0c662..db1dea02 100644 --- a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.module.less +++ b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.module.less @@ -145,7 +145,7 @@ gap: 5px; .font(@fontFamily: @baseFontBold, @fontSize: 30px); color: @PRIMARY_COLOR_RED; - + letter-spacing: -1px; span { .font(@fontFamily: @baseFont, @fontSize: 18px); color: @COLOR_GRAY04; diff --git a/com.twin.app.shoptime/src/features/main/mainSlice.js b/com.twin.app.shoptime/src/features/main/mainSlice.js index f9691234..2b80fb0a 100644 --- a/com.twin.app.shoptime/src/features/main/mainSlice.js +++ b/com.twin.app.shoptime/src/features/main/mainSlice.js @@ -35,7 +35,7 @@ export const getSubCategory = createAsyncThunk( } ); -//메인화면 Live Show 정보 조회 IF-LGSP-069 +//TOP20 영상 목록 조회 IF-LGSP-069 export const getTop20Show = createAsyncThunk( "main/getTop20Show", diff --git a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx index 5086434a..3b514286 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx @@ -1,7 +1,5 @@ import React, { useCallback, useEffect, useState, useRef } from "react"; import { useSelector } from "react-redux"; -import TPanel from "../../../components/TPanel/TPanel"; -import TButton from "../../../components/TButton/TButton"; import { $L } from "../../../utils/helperMethods"; import css from "./BestSeller.module.less"; import classNames from "classnames"; @@ -10,17 +8,13 @@ import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDeco import Spotlight from "@enact/spotlight"; import Scroller from "@enact/sandstone/Scroller"; -import { changeAppStatus } from "../../../features/common/commonSlice"; -import { getSearch } from "../../../features/search/searchSlice"; - import TGrid from "../../../components/TGrid/TGrid"; import TItemCard from "../../../components/TItemCard/TItemCard"; import SectionTitle from "../../../components/SectionTitle/SectionTitle"; const Container = SpotlightContainerDecorator( - { enterTo: "last-focused" }, - "div", - "li" + { enterTo: "last-focused", leaveFor: { left: "", right: "" } }, + "div" ); const BestSeller = () => { @@ -50,6 +44,7 @@ const BestSeller = () => { rank={bestSeller.rankOrd} isBestSeller accType + offerInfo={bestSeller.offerInfo} /> ))} diff --git a/com.twin.app.shoptime/src/views/HomePanel/OnSale/OnSale.jsx b/com.twin.app.shoptime/src/views/HomePanel/OnSale/OnSale.jsx index 03db95d4..35dc37e6 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/OnSale/OnSale.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/OnSale/OnSale.jsx @@ -17,15 +17,13 @@ import { getOnSaleInfo } from "../../../features/onSale/onSaleSlice"; import css from "./OnSale.module.less"; -const SpottableComponent = Spottable("div"); - const Container = SpotlightContainerDecorator( - { - enterTo: "default-element", - }, + { leaveFor: { left: "", right: "" }, enterTo: "last-focused" }, "div" ); +const SpottableComponent = Spottable("li"); + const OnSale = ({ isOnTop, spotlightId, @@ -59,7 +57,7 @@ const OnSale = ({ } item.priceInfo.split("|")[0]; return ( -

  • +
    @@ -81,7 +79,7 @@ const OnSale = ({
    -
  • + ); })} diff --git a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx index 7a9ad063..a1603a9b 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx @@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { $L } from "../../../utils/helperMethods"; import { Job } from "@enact/core/util"; +import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator"; import Spotlight from "@enact/spotlight"; import Spottable from "@enact/spotlight/Spottable"; import Scroller from "@enact/sandstone/Scroller"; @@ -9,6 +10,11 @@ import { getTop20Show } from "../../../features/main/mainSlice"; import classNames from "classnames"; import css from "../PopularShow/PopularShow.module.less"; +const Container = SpotlightContainerDecorator( + { leaveFor: { left: "", right: "" }, enterTo: "last-focused" }, + "div" +); + const SpottableComponent = Spottable("li"); const PopularShow = (...rest) => { @@ -27,8 +33,8 @@ const PopularShow = (...rest) => { {topInfos && topInfos.map((item) => { return ( -
  • { > {item.showNm}
  • - + ); })} diff --git a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx index e70ab839..92d7f05c 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx @@ -18,9 +18,11 @@ import TItemCard from "../../../components/TItemCard/TItemCard"; import { getSubCategory } from "../../../features/main/mainSlice"; import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator"; + const Container = SpotlightContainerDecorator( { - enterTo: "default-element", + leaveFor: { left: "", right: "" }, + enterTo: "last-focused", }, "div" ); @@ -45,7 +47,6 @@ const SubCategory = () => { }; useEffect(() => { - console.log(testchk); if (categoryInfos && !currentLgCatCd) { const initialLgCatCd = categoryInfos[0].lgCatCd; setCurrentLgCatCd(initialLgCatCd); @@ -97,7 +98,7 @@ const SubCategory = () => { subCategoryData.slice(0, 9).map((item) => { return (