[에너지 라벨 관련] 스타일 수정

- Titemcard 노출부분 수정과 스타일 수정.
This commit is contained in:
junghoon86.park
2025-11-11 15:50:44 +09:00
parent 8fc492eaf8
commit 69659f301e
2 changed files with 22 additions and 12 deletions

View File

@@ -245,7 +245,7 @@
> p {
font-weight: bold;
font-size: 30px;
font-size: 28px;
color: @PRIMARY_COLOR_RED;
margin-top: 8px;

View File

@@ -86,7 +86,7 @@ export const removeDotAndColon = (string) => {
};
const parsePrice = (price) => {
return parseFloat(price?.replace(/[^0-9.-]+/g, "") || "0");
return parseFloat(price?.replace(/[^0-9.-]+/g, "").replace("£","") || "0");
};
const generateMockEnergyLabels = (productId) => {
@@ -474,13 +474,19 @@ export default memo(function TItemCardNew({
className={classNames(
css.descWrap,
catNm && css.hstNmWrap,
parsePrice(originPrice) >= 1000 &&
parsePrice(dcPrice) >= 1000 &&
(countryCode === "GB" || countryCode === "DE") &&
(parsePrice(originalPrice) >= 1000 || parsePrice(originPrice) >= 1000 ) &&
(parsePrice(discountedPrice) >= 1000 || parsePrice(dcPrice) >= 1000 ) &&
euEnrgLblInfos?.length > 0 &&
euEnrgLblInfos[0]?.enrgLblIcnUrl !== null &&
euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined &&
countryCode === "GB" &&
css.labelBox,
parsePrice(originPrice) >= 10000 &&
parsePrice(dcPrice) >= 10000 &&
(countryCode === "GB" || countryCode === "DE") &&
(parsePrice(originalPrice) >= 10000 || parsePrice(originPrice) >= 10000 ) &&
(parsePrice(discountedPrice) >= 10000 || parsePrice(dcPrice) >= 10000 ) &&
euEnrgLblInfos?.length > 0 &&
euEnrgLblInfos[0]?.enrgLblIcnUrl !== null &&
euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined &&
countryCode === "GB" &&
css.labelOverBox
)}
>
@@ -525,11 +531,11 @@ export default memo(function TItemCardNew({
)}
</div>
{(() => {
const hasValidApiData =
{/* const hasValidApiData =
euEnrgLblInfos?.length > 0 &&
euEnrgLblInfos[0]?.enrgLblIcnUrl !== null &&
euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined;
euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined; */}
const hasValidApiData = true;
let energyLabels;
if (CURRENT_ENERGY_LABEL_MODE === ENERGY_LABEL_MODE.API_ONLY) {
@@ -550,7 +556,11 @@ export default memo(function TItemCardNew({
}
return (
(countryCode === "GB" || countryCode === "DE") && (
countryCode === "GB" &&
(euEnrgLblInfos?.length > 0 &&
euEnrgLblInfos[0]?.enrgLblIcnUrl !== null &&
euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined) &&
(
<div className={css.labelImgBox}>
{type !== "videoShow" &&
energyLabels