[디테일] 하단 구매 토스트 노출 관련수정

- 디테일 상단 백버튼에 포커스가면 clearAllToasts 처리.
This commit is contained in:
junghoon86.park
2025-10-30 14:26:29 +09:00
parent b727499e4b
commit 8e3d03ef19
2 changed files with 14 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ import {
clearProductDetail,
getProductOptionId,
} from '../../actions/productActions';
import { clearAllToasts } from '../../actions/toastActions';
import TBody from '../../components/TBody/TBody';
import TPanel from '../../components/TPanel/TPanel';
import { panel_names } from '../../utils/Config';
@@ -180,6 +181,10 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
[dispatch, panelInfo, panels]
);
const onBackButtonFocus = useCallback(() => {
dispatch(clearAllToasts());
},[dispatch])
const handleScrollToSection = useCallback(
(sectionId) => {
console.log('DetailPanel: handleScrollToSection called with:', sectionId);
@@ -681,6 +686,7 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
title={headerTitle}
onBackButton
onClick={onClick(false)}
onBackButtonFocus={onBackButtonFocus}
spotlightDisabled={isLoading}
onSpotlightUp={onSpotlightUpTButton}
onSpotlightLeft={onSpotlightUpTButton}