[PlayerPanel] tabCotents loading component change

This commit is contained in:
고동영
2024-05-28 16:03:25 +09:00
parent 9b99ed927b
commit 85b80aa36f
7 changed files with 20 additions and 61 deletions

View File

@@ -76,12 +76,14 @@ export default function TabContainer({
setIsChatVisible={setIsChatVisible} setIsChatVisible={setIsChatVisible}
playListInfo={playListInfo && playListInfo[selectedIndex]} playListInfo={playListInfo && playListInfo[selectedIndex]}
panelInfo={panelInfo} panelInfo={panelInfo}
tabIndex={tab}
/> />
)} )}
{panelInfo?.shptmBanrTpNm === "VOD" && tab === 1 && ( {panelInfo?.shptmBanrTpNm === "VOD" && tab === 1 && (
<FeaturedShowContents <FeaturedShowContents
featuredShowsInfos={playListInfo} featuredShowsInfos={playListInfo}
setSelectedIndex={setSelectedIndex} setSelectedIndex={setSelectedIndex}
tabIndex={tab}
/> />
)} )}
{panelInfo?.shptmBanrTpNm === "LIVE" && tab === 1 && liveChannelInfos && ( {panelInfo?.shptmBanrTpNm === "LIVE" && tab === 1 && liveChannelInfos && (
@@ -89,6 +91,7 @@ export default function TabContainer({
selectedIndex={selectedIndex} selectedIndex={selectedIndex}
setSelectedIndex={setSelectedIndex} setSelectedIndex={setSelectedIndex}
liveInfos={playListInfo} liveInfos={playListInfo}
tabIndex={tab}
/> />
)} )}

View File

@@ -9,13 +9,14 @@ import { updatePanel } from "../../../../actions/panelActions";
import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList"; import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList";
import { panel_names } from "../../../../utils/Config"; import { panel_names } from "../../../../utils/Config";
import { $L } from "../../../../utils/helperMethods"; import { $L } from "../../../../utils/helperMethods";
import ListEmptyContents from "../../../ImagePanel/ImageSideContents/ListEmptyContents/ListEmptyContents";
import PlayerItemCard, { TYPES } from "../../PlayerItemCard/PlayerItemCard"; import PlayerItemCard, { TYPES } from "../../PlayerItemCard/PlayerItemCard";
import css from "./LiveChannelContents.module.less"; import css from "./LiveChannelContents.module.less";
import PlayerTabLoading from "./PlayerTabLoading";
export default function FeaturedShowContents({ export default function FeaturedShowContents({
featuredShowsInfos, featuredShowsInfos,
setSelectedIndex, setSelectedIndex,
tabIndex,
}) { }) {
const dispatch = useDispatch(); const dispatch = useDispatch();
@@ -83,7 +84,7 @@ export default function FeaturedShowContents({
noScrollByWheel={false} noScrollByWheel={false}
/> />
) : ( ) : (
<PlayerTabLoading textType={$L("Show")} /> <ListEmptyContents tabIndex={tabIndex} />
)} )}
</div> </div>
</> </>

View File

@@ -7,14 +7,15 @@ import Spotlight from "@enact/spotlight";
import { updatePanel } from "../../../../actions/panelActions"; import { updatePanel } from "../../../../actions/panelActions";
import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList"; import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList";
import { panel_names } from "../../../../utils/Config"; import { panel_names } from "../../../../utils/Config";
import ListEmptyContents from "../../../ImagePanel/ImageSideContents/ListEmptyContents/ListEmptyContents";
import PlayerItemCard, { TYPES } from "../../PlayerItemCard/PlayerItemCard"; import PlayerItemCard, { TYPES } from "../../PlayerItemCard/PlayerItemCard";
import css from "./LiveChannelContents.module.less"; import css from "./LiveChannelContents.module.less";
import PlayerTabLoading from "./PlayerTabLoading";
export default function LiveChannelContents({ export default function LiveChannelContents({
liveInfos, liveInfos,
selectedIndex, selectedIndex,
setSelectedIndex, setSelectedIndex,
tabIndex,
}) { }) {
const dispatch = useDispatch(); const dispatch = useDispatch();
@@ -78,7 +79,7 @@ export default function LiveChannelContents({
noScrollByWheel={false} noScrollByWheel={false}
/> />
) : ( ) : (
<PlayerTabLoading textType={$L("Show")} /> <ListEmptyContents tabIndex={tabIndex} />
)} )}
</div> </div>
</> </>

View File

@@ -1,16 +0,0 @@
import React from "react";
import loading from "../../../../../assets/images/img-contents-loading@3x.png";
import { $L } from "../../../../utils/helperMethods";
import css from "./PlayerTabLoading.module.less";
export default function PlayerTabLoading(textType) {
return (
<div className={css.loadingContainer}>
<img src={loading} alt="" />
<div>
{$L("Loading") + " " + textType + " " + "Details. Please Wait..."}
</div>
</div>
);
}

View File

@@ -1,21 +0,0 @@
@import "../../../../style/utils.module.less";
.loadingContainer {
height: 250px;
display: flex;
align-items: center;
flex-direction: column;
font-size: 30px;
line-height: 1.4;
color: #8290a0;
margin-top: 60px;
> img {
.size(@w: 360px , @h: 174px);
}
> div {
.size(@w: 311px , @h: 80px);
text-align: center;
}
}

View File

@@ -12,7 +12,7 @@ import TItemCard, {
} from "../../../../components/TItemCard/TItemCard"; } from "../../../../components/TItemCard/TItemCard";
import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList"; import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList";
import { panel_names } from "../../../../utils/Config"; import { panel_names } from "../../../../utils/Config";
import PlayerTabLoading from "./PlayerTabLoading"; import ListEmptyContents from "../../../ImagePanel/ImageSideContents/ListEmptyContents/ListEmptyContents";
import css from "./ShopNowContents.module.less"; import css from "./ShopNowContents.module.less";
const Container = SpotlightContainerDecorator( const Container = SpotlightContainerDecorator(
@@ -25,6 +25,7 @@ export default function ShopNowContents({
setIsChatVisible, setIsChatVisible,
playListInfo, playListInfo,
panelInfo, panelInfo,
tabIndex,
}) { }) {
const dispatch = useDispatch(); const dispatch = useDispatch();
const [height, setHeight] = useState(); const [height, setHeight] = useState();
@@ -116,7 +117,7 @@ export default function ShopNowContents({
noScrollByWheel={false} noScrollByWheel={false}
/> />
) : ( ) : (
<PlayerTabLoading textType={$L("Product")} /> <ListEmptyContents tabIndex={tabIndex} />
)} )}
</Container> </Container>
</> </>

View File

@@ -1,23 +1,13 @@
import React, { import React, { useCallback, useEffect, useMemo, useState } from "react";
useCallback,
useEffect,
useMemo,
useState,
} from 'react';
import { import { useDispatch, useSelector } from "react-redux";
useDispatch,
useSelector,
} from 'react-redux';
import { pushPanel } from '../../../../actions/panelActions'; import { pushPanel } from "../../../../actions/panelActions";
import TItemCard, { TYPES } from '../../../../components/TItemCard/TItemCard'; import TItemCard, { TYPES } from "../../../../components/TItemCard/TItemCard";
import TVirtualGridList import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList";
from '../../../../components/TVirtualGridList/TVirtualGridList'; import { panel_names } from "../../../../utils/Config";
import { panel_names } from '../../../../utils/Config'; import { $L } from "../../../../utils/helperMethods";
import { $L } from '../../../../utils/helperMethods'; import css from "./YouMayLikeContents.module.less";
import PlayerTabLoading from './PlayerTabLoading';
import css from './YouMayLikeContents.module.less';
export default function YouMayLikeContents({ shopNowInfo }) { export default function YouMayLikeContents({ shopNowInfo }) {
const dispatch = useDispatch(); const dispatch = useDispatch();