[SHOPTIME-3369] Featured Brands / Live channels 특정채널 배너 적용

1. asset/img-brands-juvelirochka@3x.png, img-brands-shop-lc@3x.png 추가
2. LiveChannelsVerticalContents.jsx
3. LiveChannelsVerticalContents.module.less
- 원인: 없음
- 대책: 러시아 환경, Juvelirochaka 브랜드에 한하여 특정 배너 반영
This commit is contained in:
younghoon100.park
2024-10-23 16:01:53 +09:00
parent bd1167a947
commit a81cf3c0e1
4 changed files with 50 additions and 13 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -1,4 +1,11 @@
import React, { memo, useCallback, useEffect, useRef, useState } from "react";
import React, {
memo,
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import { useDispatch, useSelector } from "react-redux";
@@ -10,13 +17,14 @@ import {
setContainerLastFocusedElement,
} from "@enact/spotlight/src/container";
import ImgNoData from "../../../../../assets/images/img-no-data@3x.png";
import ImgNoProductDefault from "../../../../../assets/images/img-no-data@3x.png";
import ImgNoProductJuvelirochka from "../../../../../assets/images/img-brands-juvelirochka@3x.png";
import ImgNoProductShopLC from "../../../../../assets/images/img-brands-shop-lc@3x.png";
import { updatePanel } from "../../../../actions/panelActions";
import {
finishVideoPreview,
startVideoPlayer,
} from "../../../../actions/playActions";
import { removeDotAndColon } from "../../../../components/TItemCard/TItemCard";
import { panel_names } from "../../../../utils/Config";
import { $L } from "../../../../utils/helperMethods";
import css from "./LiveChannelsVerticalContents.module.less";
@@ -41,21 +49,24 @@ export default memo(function LiveChannelsVerticalContents({
}) {
const dispatch = useDispatch();
const cntry_cd = useSelector((state) => state.common.httpHeader?.cntry_cd);
const cursorVisible = useSelector(
(state) => state.common.appStatus.cursorVisible
);
const [isFocused, setIsFocused] = useState(false);
const isFullScreenModeActivedRef = useRef(false);
const videoFocusTimeoutJob = useRef(new Job((func) => func(), 1000));
const {
brandProductInfo, //
chanId,
patnrId,
showId,
showUrl,
} = brandChanInfoItem;
const { brandProductInfo, chanId, patnrId, showId, showUrl } =
brandChanInfoItem;
const isJuvelirochka = useMemo(
() => cntry_cd === "RU" && patnrId === "12",
[cntry_cd, patnrId]
);
useEffect(() => {
if (brandProductInfo && brandProductInfo.length > 0) {
@@ -162,6 +173,16 @@ export default memo(function LiveChannelsVerticalContents({
}
}, [handleItemFocus]);
const getNoProductImg = useCallback((countryCode, partnerId) => {
let img = ImgNoProductDefault;
if (countryCode === "RU" && partnerId === "12") {
img = ImgNoProductJuvelirochka;
}
return img;
}, []);
return (
<Container
className={css.container}
@@ -189,8 +210,18 @@ export default memo(function LiveChannelsVerticalContents({
) : (
<figure>
<div>
<img src={ImgNoData} alt="" />
<img
className={
!isJuvelirochka
? css.noProductDefault
: css.noProductJuvelirochka
}
src={getNoProductImg(cntry_cd, patnrId)}
alt=""
/>
{!isJuvelirochka && (
<figcaption>{$L(STRING_CONF.NO_PRODUCT_MESSAGE)}</figcaption>
)}
</div>
</figure>
)}

View File

@@ -20,9 +20,15 @@
background-color: @COLOR_WHITE;
> img {
&.noProductDefault {
.size(@w: 360px, @h: 180px);
}
&.noProductJuvelirochka {
.size(@w: inherit, @h: inherit);
}
}
> figcaption {
.size(@w: 360px, @h: 65px);
color: #a8a8a8;