[DetailPanel] youmaylike onClick시 themeData 초기화

This commit is contained in:
고동영
2024-08-01 14:35:55 +09:00
parent 5a46b5bf1e
commit 1e0e41e1e4
2 changed files with 8 additions and 1 deletions

View File

@@ -122,7 +122,7 @@ export const homeReducer = (state = initialState, action) => {
return {
...state,
themeCurationHotelDetailData: null,
themeCurationDetailInfoData: null,
themeCurationDetailInfoData: [],
productData: null,
hotelData: null,
};

View File

@@ -16,6 +16,7 @@ import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDeco
import Spottable from "@enact/spotlight/Spottable";
import { setContainerLastFocusedElement } from "@enact/spotlight/src/container";
import { clearThemeDetail } from "../../../actions/homeActions";
import { getMainYouMayLike } from "../../../actions/mainActions";
import { popPanel, pushPanel } from "../../../actions/panelActions";
import { finishVideoPreview } from "../../../actions/playActions";
@@ -53,6 +54,9 @@ export default memo(function YouMayLike({
const cursorVisible = useSelector(
(state) => state.common.appStatus.cursorVisible
);
const themeProductInfos = useSelector(
(state) => state.home.themeCurationDetailInfoData
);
const cursorOpen = useRef(new Job((func) => func(), 1000));
const launchedFromPlayer = useMemo(() => {
@@ -142,6 +146,9 @@ export default memo(function YouMayLike({
dispatch(popPanel(panel_names.DETAIL_PANEL));
setContainerLastFocusedElement(null, ["indicator-GridListContainer"]);
if (themeProductInfos && themeProductInfos.length > 0) {
dispatch(clearThemeDetail());
}
dispatch(
pushPanel({
name: panel_names.DETAIL_PANEL,