[DetailPanel] themeIndicator css 수정 & Media 에서 보이게 수정

This commit is contained in:
고동영
2024-05-20 18:41:06 +09:00
parent 31310f0912
commit 2e77990620
13 changed files with 303 additions and 220 deletions

View File

@@ -15,6 +15,7 @@ import { finishVideoPreview } from "../../actions/playActions";
import {
clearProductDetail,
getProductGroup,
getProductImageLength,
} from "../../actions/productActions";
import TBody from "../../components/TBody/TBody";
import THeader from "../../components/THeader/THeader";
@@ -186,6 +187,22 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
}
}, [panelInfo]);
useEffect(() => {
if (
((themeProductInfos && themeProductInfos.length > 0) ||
(hotelInfos && hotelInfos.length > 0)) &&
selectedIndex !== undefined
) {
if (type === "theme") {
const imgUrls600 = themeProductInfos[selectedIndex]?.imgUrls600 || [];
dispatch(getProductImageLength({ imageLength: imgUrls600.length }));
return;
}
const imgUrls600 = hotelInfos[selectedIndex]?.imgUrls600 || [];
dispatch(getProductImageLength({ imageLength: imgUrls600.length }));
}
}, [dispatch, themeProductInfos, selectedIndex, hotelInfos]);
return (
<>
<TPanel