- 메인 bestseller쪽 금액표시부분 수정

- mainSlice부분 오기입 수정
- onsale,popularshow부분 수정
This commit is contained in:
junghoon86.park
2024-01-30 15:48:07 +09:00
parent 5203dba8f6
commit 39fe396d60
7 changed files with 29 additions and 24 deletions

View File

@@ -28,6 +28,7 @@ export default memo(function ProductCard({
soldoutFlag, soldoutFlag,
type = TYPE_VERTICAL, type = TYPE_VERTICAL,
accType = false, accType = false,
offerInfo,
...rest ...rest
}) { }) {
const handleClick = useCallback( const handleClick = useCallback(
@@ -83,7 +84,11 @@ export default memo(function ProductCard({
<div> <div>
<h3>{productName}</h3> <h3>{productName}</h3>
<p> <p>
{discountRate ? discountedPrice : originalPrice} {offerInfo != ""
? offerInfo
: discountRate
? discountedPrice
: originalPrice}
{discountRate && ( {discountRate && (
<span>{accType ? originalPrice : discountRate}</span> <span>{accType ? originalPrice : discountRate}</span>
)} )}

View File

@@ -145,7 +145,7 @@
gap: 5px; gap: 5px;
.font(@fontFamily: @baseFontBold, @fontSize: 30px); .font(@fontFamily: @baseFontBold, @fontSize: 30px);
color: @PRIMARY_COLOR_RED; color: @PRIMARY_COLOR_RED;
letter-spacing: -1px;
span { span {
.font(@fontFamily: @baseFont, @fontSize: 18px); .font(@fontFamily: @baseFont, @fontSize: 18px);
color: @COLOR_GRAY04; color: @COLOR_GRAY04;

View File

@@ -35,7 +35,7 @@ export const getSubCategory = createAsyncThunk(
} }
); );
//메인화면 Live Show 정보 조회 IF-LGSP-069 //TOP20 영상 목록 조회 IF-LGSP-069
export const getTop20Show = createAsyncThunk( export const getTop20Show = createAsyncThunk(
"main/getTop20Show", "main/getTop20Show",

View File

@@ -1,7 +1,5 @@
import React, { useCallback, useEffect, useState, useRef } from "react"; import React, { useCallback, useEffect, useState, useRef } from "react";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import TPanel from "../../../components/TPanel/TPanel";
import TButton from "../../../components/TButton/TButton";
import { $L } from "../../../utils/helperMethods"; import { $L } from "../../../utils/helperMethods";
import css from "./BestSeller.module.less"; import css from "./BestSeller.module.less";
import classNames from "classnames"; import classNames from "classnames";
@@ -10,17 +8,13 @@ import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDeco
import Spotlight from "@enact/spotlight"; import Spotlight from "@enact/spotlight";
import Scroller from "@enact/sandstone/Scroller"; 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 TGrid from "../../../components/TGrid/TGrid";
import TItemCard from "../../../components/TItemCard/TItemCard"; import TItemCard from "../../../components/TItemCard/TItemCard";
import SectionTitle from "../../../components/SectionTitle/SectionTitle"; import SectionTitle from "../../../components/SectionTitle/SectionTitle";
const Container = SpotlightContainerDecorator( const Container = SpotlightContainerDecorator(
{ enterTo: "last-focused" }, { enterTo: "last-focused", leaveFor: { left: "", right: "" } },
"div", "div"
"li"
); );
const BestSeller = () => { const BestSeller = () => {
@@ -50,6 +44,7 @@ const BestSeller = () => {
rank={bestSeller.rankOrd} rank={bestSeller.rankOrd}
isBestSeller isBestSeller
accType accType
offerInfo={bestSeller.offerInfo}
/> />
))} ))}
</TGrid> </TGrid>

View File

@@ -17,15 +17,13 @@ import { getOnSaleInfo } from "../../../features/onSale/onSaleSlice";
import css from "./OnSale.module.less"; import css from "./OnSale.module.less";
const SpottableComponent = Spottable("div");
const Container = SpotlightContainerDecorator( const Container = SpotlightContainerDecorator(
{ { leaveFor: { left: "", right: "" }, enterTo: "last-focused" },
enterTo: "default-element",
},
"div" "div"
); );
const SpottableComponent = Spottable("li");
const OnSale = ({ const OnSale = ({
isOnTop, isOnTop,
spotlightId, spotlightId,
@@ -59,7 +57,7 @@ const OnSale = ({
} }
item.priceInfo.split("|")[0]; item.priceInfo.split("|")[0];
return ( return (
<li key={index} className={css.onSaleItemList}> <SpottableComponent key={index} className={css.onSaleItemList}>
<img src={item.imgUrl} className={css.onSaleItemListImg} /> <img src={item.imgUrl} className={css.onSaleItemListImg} />
<div className={css.onSaleItemListBox}> <div className={css.onSaleItemListBox}>
<div className={css.onSaleItemListBoxTitle}> <div className={css.onSaleItemListBoxTitle}>
@@ -81,7 +79,7 @@ const OnSale = ({
</span> </span>
</div> </div>
</div> </div>
</li> </SpottableComponent>
); );
})} })}
</ul> </ul>

View File

@@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { $L } from "../../../utils/helperMethods"; import { $L } from "../../../utils/helperMethods";
import { Job } from "@enact/core/util"; import { Job } from "@enact/core/util";
import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator";
import Spotlight from "@enact/spotlight"; import Spotlight from "@enact/spotlight";
import Spottable from "@enact/spotlight/Spottable"; import Spottable from "@enact/spotlight/Spottable";
import Scroller from "@enact/sandstone/Scroller"; import Scroller from "@enact/sandstone/Scroller";
@@ -9,6 +10,11 @@ import { getTop20Show } from "../../../features/main/mainSlice";
import classNames from "classnames"; import classNames from "classnames";
import css from "../PopularShow/PopularShow.module.less"; import css from "../PopularShow/PopularShow.module.less";
const Container = SpotlightContainerDecorator(
{ leaveFor: { left: "", right: "" }, enterTo: "last-focused" },
"div"
);
const SpottableComponent = Spottable("li"); const SpottableComponent = Spottable("li");
const PopularShow = (...rest) => { const PopularShow = (...rest) => {
@@ -27,8 +33,8 @@ const PopularShow = (...rest) => {
{topInfos && {topInfos &&
topInfos.map((item) => { topInfos.map((item) => {
return ( return (
<li <SpottableComponent
key={item.listItem} key={item.expsOrd}
className={classNames( className={classNames(
item.thumbnailUrl960 == item.thumbnailUrl item.thumbnailUrl960 == item.thumbnailUrl
? css.listItemVertical ? css.listItemVertical
@@ -45,7 +51,7 @@ const PopularShow = (...rest) => {
> >
{item.showNm} {item.showNm}
</div> </div>
</li> </SpottableComponent>
); );
})} })}
</ul> </ul>

View File

@@ -18,9 +18,11 @@ import TItemCard from "../../../components/TItemCard/TItemCard";
import { getSubCategory } from "../../../features/main/mainSlice"; import { getSubCategory } from "../../../features/main/mainSlice";
import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator"; import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator";
const Container = SpotlightContainerDecorator( const Container = SpotlightContainerDecorator(
{ {
enterTo: "default-element", leaveFor: { left: "", right: "" },
enterTo: "last-focused",
}, },
"div" "div"
); );
@@ -45,7 +47,6 @@ const SubCategory = () => {
}; };
useEffect(() => { useEffect(() => {
console.log(testchk);
if (categoryInfos && !currentLgCatCd) { if (categoryInfos && !currentLgCatCd) {
const initialLgCatCd = categoryInfos[0].lgCatCd; const initialLgCatCd = categoryInfos[0].lgCatCd;
setCurrentLgCatCd(initialLgCatCd); setCurrentLgCatCd(initialLgCatCd);
@@ -97,7 +98,7 @@ const SubCategory = () => {
subCategoryData.slice(0, 9).map((item) => { subCategoryData.slice(0, 9).map((item) => {
return ( return (
<TItemCard <TItemCard
key={item.expsOrd} key={item.rankOrd}
imageSource={item.imgUrl} imageSource={item.imgUrl}
imageAlt={item.prdtNm} imageAlt={item.prdtNm}
productName={item.prdtNm} productName={item.prdtNm}