[DetailPanel] themeIndicator css 수정 & Media 에서 보이게 수정
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user