[FeaturedBrandsPanel] API response test commit

Detail Notes :

1. LoadingPanel, wait delay, 임시 0 설정
This commit is contained in:
younghoon100.park
2024-03-28 19:46:48 +09:00
parent edddfa357f
commit de74b507e0
3 changed files with 26 additions and 15 deletions

View File

@@ -270,30 +270,41 @@ export default function FeaturedBrandsPanel() {
}; };
}, []); }, []);
// @@pyh Todo, test ref
const timerRef = useRef();
useEffect(() => { useEffect(() => {
if (brandInfo && selectedPatnrId) { if (brandInfo && selectedPatnrId) {
dispatch(
getBrandCategoryInfo({
patnrId: selectedPatnrId,
})
);
dispatch(getBrandRecommendedShowInfo({ patnrId: selectedPatnrId }));
// @@pyh Todo, test timeout
timerRef.current = setTimeout(() => {
dispatch(getBrandLiveChannelInfo({ patnrId: selectedPatnrId }));
dispatch(getBrandLayoutInfo({ patnrId: selectedPatnrId }));
dispatch(getBrandSeriesInfo({ patnrId: selectedPatnrId }));
dispatch(getBrandTSVInfo({ patnrId: selectedPatnrId }));
dispatch(getBrandBestSeller({ patnrId: selectedPatnrId }));
dispatch(getBrandCreatorsInfo({ patnrId: selectedPatnrId }));
}, 50);
setSelectedBrandInfo(findItemByValue(brandInfo, selectedPatnrId)); setSelectedBrandInfo(findItemByValue(brandInfo, selectedPatnrId));
setSelectedCatCd(); setSelectedCatCd();
setSelectedHstNm(); setSelectedHstNm();
setSelectedSeriesId(); setSelectedSeriesId();
setSelectedCatCdLv1(); setSelectedCatCdLv1();
setSelectedCatCdLv2(); setSelectedCatCdLv2();
dispatch(getBrandLayoutInfo({ patnrId: selectedPatnrId }));
dispatch(getBrandLiveChannelInfo({ patnrId: selectedPatnrId }));
dispatch(getBrandTSVInfo({ patnrId: selectedPatnrId }));
dispatch(getBrandBestSeller({ patnrId: selectedPatnrId }));
dispatch(getBrandRecommendedShowInfo({ patnrId: selectedPatnrId }));
dispatch(getBrandCreatorsInfo({ patnrId: selectedPatnrId }));
dispatch(getBrandSeriesInfo({ patnrId: selectedPatnrId }));
dispatch(
getBrandCategoryInfo({
patnrId: selectedPatnrId,
})
);
} }
}, [brandInfo, dispatch, selectedPatnrId]); }, [brandInfo, dispatch, selectedPatnrId]);
// @@pyh Todo, test unmounted
useEffect(() => {
return () => clearTimeout(timerRef);
}, []);
useEffect(() => { useEffect(() => {
if (selectedCatCd) { if (selectedCatCd) {
dispatch( dispatch(

View File

@@ -79,7 +79,7 @@
.player { .player {
.position(@position: absolute, @top: 0, @left: 0); .position(@position: absolute, @top: 0, @left: 0);
z-index: 10; // z-index: 10;
height: 564px; height: 564px;
&.horizontal { &.horizontal {

View File

@@ -17,7 +17,7 @@ import TPopUp from "../../components/TPopUp/TPopUp";
import { $L } from "../../utils/helperMethods"; import { $L } from "../../utils/helperMethods";
import css from "./LoadingPanel.module.less"; import css from "./LoadingPanel.module.less";
const MIN_SHOWING_TIME = { launching: 2000, wait: 1000, default: 1000 }; const MIN_SHOWING_TIME = { launching: 2000, wait: 0, default: 1000 };
const MAX_SHOWING_TIME = 20000; const MAX_SHOWING_TIME = 20000;
const MAX_SHOWING_TIME_UNLIMITED = Number.MAX_SAFE_INTEGER; const MAX_SHOWING_TIME_UNLIMITED = Number.MAX_SAFE_INTEGER;
const DUMMY_DELAY = 1000; const DUMMY_DELAY = 1000;