[Log] IF-LGSP-LOG-100, adjust params (RollingUnit.jsx, RandomUnit.jsx)
This commit is contained in:
@@ -76,8 +76,27 @@ export default function RandomUnit({
|
||||
const randomDataRef = useRef(bannerDetailInfos[randomNumber]);
|
||||
|
||||
const topContentsLogInfo = useMemo(() => {
|
||||
if (curationId && curtNm) {
|
||||
if (randomDataRef.current) {
|
||||
const currentRandomData = randomDataRef.current;
|
||||
|
||||
let contId, contNm;
|
||||
|
||||
switch (currentRandomData?.shptmBanrTpCd) {
|
||||
case "DSP00301":
|
||||
case "DSP00302":
|
||||
contId = currentRandomData?.showId;
|
||||
contNm = currentRandomData?.showNm;
|
||||
break;
|
||||
case "DSP00303":
|
||||
contId = currentRandomData?.shptmLnkTpCd;
|
||||
contNm = currentRandomData?.shptmLnkTpNm;
|
||||
break;
|
||||
default:
|
||||
contId = currentRandomData?.prdtId;
|
||||
contNm = currentRandomData?.prdtNm;
|
||||
break;
|
||||
}
|
||||
|
||||
return {
|
||||
banrNo: `${currentRandomData?.banrDpOrd}`,
|
||||
banrTpNm: currentRandomData?.vtctpYn
|
||||
@@ -85,8 +104,8 @@ export default function RandomUnit({
|
||||
? "Vertical"
|
||||
: "Horizontal"
|
||||
: "",
|
||||
contId: curationId,
|
||||
contNm: curtNm,
|
||||
contId,
|
||||
contNm,
|
||||
contTpNm: currentRandomData?.shptmBanrTpNm ?? "",
|
||||
dspyTpNm: bannerDataRef.current?.shptmDspyTpNm ?? "",
|
||||
expsOrd: bannerDataRef.current?.banrLctnNo ?? "",
|
||||
@@ -98,7 +117,7 @@ export default function RandomUnit({
|
||||
}
|
||||
|
||||
return {};
|
||||
}, [curationId, curtNm, shptmTmplCd]);
|
||||
}, [shptmTmplCd]);
|
||||
|
||||
// 1. 비디오(live) 에러 감지
|
||||
// 2. 라이브 영상이 2개 이상이면, 그 다음 영상으로 전환
|
||||
|
||||
@@ -102,8 +102,27 @@ export default function RollingUnit({
|
||||
const rollingDataRef = useRef(rollingData);
|
||||
|
||||
const topContentsLogInfo = useMemo(() => {
|
||||
if (curationId && curtNm) {
|
||||
if (rollingDataRef.current) {
|
||||
const currentRollingData = rollingDataRef.current[startIndex];
|
||||
|
||||
let contId, contNm;
|
||||
|
||||
switch (currentRollingData?.shptmBanrTpCd) {
|
||||
case "DSP00301":
|
||||
case "DSP00302":
|
||||
contId = currentRollingData?.showId;
|
||||
contNm = currentRollingData?.showNm;
|
||||
break;
|
||||
case "DSP00303":
|
||||
contId = currentRollingData?.shptmLnkTpCd;
|
||||
contNm = currentRollingData?.shptmLnkTpNm;
|
||||
break;
|
||||
default:
|
||||
contId = currentRollingData?.prdtId;
|
||||
contNm = currentRollingData?.prdtNm;
|
||||
break;
|
||||
}
|
||||
|
||||
return {
|
||||
banrNo: `${currentRollingData?.banrDpOrd}`,
|
||||
banrTpNm: currentRollingData?.vtctpYn
|
||||
@@ -111,8 +130,8 @@ export default function RollingUnit({
|
||||
? "Vertical"
|
||||
: "Horizontal"
|
||||
: "",
|
||||
contId: curationId,
|
||||
contNm: curtNm,
|
||||
contId,
|
||||
contNm,
|
||||
contTpNm: currentRollingData?.shptmBanrTpNm ?? "",
|
||||
dspyTpNm: bannerDataRef.current?.shptmDspyTpNm ?? "",
|
||||
expsOrd: bannerDataRef.current?.banrLctnNo ?? "",
|
||||
@@ -124,7 +143,7 @@ export default function RollingUnit({
|
||||
}
|
||||
|
||||
return {};
|
||||
}, [curationId, curtNm, shptmTmplCd, startIndex]);
|
||||
}, [shptmTmplCd, startIndex]);
|
||||
|
||||
useEffect(() => {
|
||||
if (savedIndex !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user