[디테일] 하단 구매 토스트 노출 관련수정
- 디테일 상단 백버튼에 포커스가면 clearAllToasts 처리.
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user