[지라이슈없음] 이벤트전파방지 조건문 추가
이유 : 디테일패널에서 플레이어패널로 이동할떄 handleCancel일떄만 stopPropagation을 쓰기위함
This commit is contained in:
@@ -192,10 +192,13 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onClick = useCallback(
|
const onClick = useCallback(
|
||||||
(ev) => {
|
(isCancelClick) => (ev) => {
|
||||||
dispatch(finishVideoPreview());
|
dispatch(finishVideoPreview());
|
||||||
dispatch(popPanel(panel_names.DETAIL_PANEL));
|
dispatch(popPanel(panel_names.DETAIL_PANEL));
|
||||||
ev.stopPropagation();
|
|
||||||
|
if (isCancelClick) {
|
||||||
|
ev.stopPropagation();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[dispatch]
|
[dispatch]
|
||||||
);
|
);
|
||||||
@@ -387,7 +390,7 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
|||||||
<TPanel
|
<TPanel
|
||||||
isTabActivated={false}
|
isTabActivated={false}
|
||||||
className={css.detailPanelWrap}
|
className={css.detailPanelWrap}
|
||||||
handleCancel={onClick}
|
handleCancel={onClick(true)}
|
||||||
spotlightId={spotlightId}
|
spotlightId={spotlightId}
|
||||||
>
|
>
|
||||||
<THeader
|
<THeader
|
||||||
@@ -398,7 +401,7 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
|||||||
(panelInfo?.type === "theme" && themeData?.themeInfo[0]?.curationNm)
|
(panelInfo?.type === "theme" && themeData?.themeInfo[0]?.curationNm)
|
||||||
}
|
}
|
||||||
onBackButton
|
onBackButton
|
||||||
onClick={onClick}
|
onClick={onClick(false)}
|
||||||
spotlightDisabled={isLoading}
|
spotlightDisabled={isLoading}
|
||||||
onSpotlightUp={onSpotlightUpTButton}
|
onSpotlightUp={onSpotlightUpTButton}
|
||||||
onSpotlightLeft={onSpotlightUpTButton}
|
onSpotlightLeft={onSpotlightUpTButton}
|
||||||
|
|||||||
Reference in New Issue
Block a user