[DetailPanel] youmaylike onClick시 themeData 초기화
This commit is contained in:
@@ -122,7 +122,7 @@ export const homeReducer = (state = initialState, action) => {
|
||||
return {
|
||||
...state,
|
||||
themeCurationHotelDetailData: null,
|
||||
themeCurationDetailInfoData: null,
|
||||
themeCurationDetailInfoData: [],
|
||||
productData: null,
|
||||
hotelData: null,
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user