[251010] feat: HomeBanner 비디오 상시재생

🕐 커밋 시간: 2025. 10. 10. 13:38:25

📊 변경 통계:
  • 총 파일: 6개
  • 추가: +150줄
  • 삭제: -16줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/actions/playActions.js
  ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx
  ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RandomUnit.jsx
  ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RandomUnit.module.less
  ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RollingUnit.jsx
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx

🔧 함수 변경 내용:
  📄 com.twin.app.shoptime/src/actions/playActions.js (javascript):
     Deleted: CLEAR_PLAYER_INFO(), resumePlayerControl()
  📄 com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx (javascript):
    🔄 Modified: SpotlightContainerDecorator()
  📄 com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RollingUnit.jsx (javascript):
     Added: createPanelInfo()

🔧 주요 변경 내용:
  • 핵심 비즈니스 로직 개선
This commit is contained in:
2025-10-10 13:38:27 +09:00
parent a00856c461
commit 10d96f4d8a
6 changed files with 434 additions and 447 deletions

View File

@@ -495,7 +495,7 @@ export default function HomeBanner({ firstSpot, spotlightId, handleItemFocus, ha
// );
const renderItem = useCallback(
(index, isHorizontal) => {
(index, isHorizontal, videoPlayerable = false) => {
const data = bannerDataList?.[index] ?? {};
return (
<div className={!isHorizontal ? css.imgBox : undefined}>
@@ -507,6 +507,7 @@ export default function HomeBanner({ firstSpot, spotlightId, handleItemFocus, ha
spotlightId={'banner' + index}
handleShelfFocus={_handleShelfFocus}
handleItemFocus={_handleItemFocus}
videoPlayerable={videoPlayerable}
/>
) : data.shptmDspyTpNm === 'Random' ? (
<Random
@@ -517,6 +518,7 @@ export default function HomeBanner({ firstSpot, spotlightId, handleItemFocus, ha
handleShelfFocus={_handleShelfFocus}
handleItemFocus={_handleItemFocus}
randomNumber={data.randomIndex}
videoPlayerable={videoPlayerable}
/>
) : (
<SpottableComponent spotlightId={'banner' + index}>
@@ -629,10 +631,10 @@ export default function HomeBanner({ firstSpot, spotlightId, handleItemFocus, ha
return (
<>
<ContainerBasic className={css.smallBox}>
{renderItem(0, true)}
{renderItem(1, true)}
{renderItem(0, true, true)}
{renderItem(1, true, true)}
</ContainerBasic>
{renderItem(2, false)}
{renderItem(2, false, false)}
{/* //NOTE - 약관 동의 여부 & 추후 API 따라 팝업 표시 여부 결정 */}
{introTermsAgree === 'Y' ? (
<div className={css.imgBox}>
@@ -645,7 +647,7 @@ export default function HomeBanner({ firstSpot, spotlightId, handleItemFocus, ha
/>
</div>
) : (
renderItem(3, false)
renderItem(3, false, false)
)}
</>
);
@@ -653,23 +655,23 @@ export default function HomeBanner({ firstSpot, spotlightId, handleItemFocus, ha
case 'DSP00202': {
return (
<>
{renderItem(0, false)}
{renderItem(0, false, false)}
<ContainerBasic className={css.smallBox}>
{renderItem(1, true)}
{renderItem(2, true)}
{renderItem(1, true, true)}
{renderItem(2, true, true)}
</ContainerBasic>
{renderItem(3, false)}
{renderItem(3, false, false)}
</>
);
}
case 'DSP00203': {
return (
<>
{renderItem(0, false)}
{renderItem(1, false)}
{renderItem(0, false, false)}
{renderItem(1, false, false)}
<ContainerBasic className={css.smallBox}>
{renderItem(2, true)}
{renderItem(3, true)}
{renderItem(2, true, true)}
{renderItem(3, true, true)}
</ContainerBasic>
</>
);