diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx index d83a69c3..adb6e497 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx @@ -52,7 +52,7 @@ import { } from '../../../actions/toastActions'; import CustomImage from '../../../components/CustomImage/CustomImage.jsx'; // ProductInfoSection imports -import TButton from '../../../components/TButton/TButton'; +import TButton, { TYPES } from '../../../components/TButton/TButton'; import TPopUp from '../../../components/TPopUp/TPopUp.jsx'; import TVirtualGridList from '../../../components/TVirtualGridList/TVirtualGridList.jsx'; @@ -286,6 +286,20 @@ export default function ProductAllSection({ const [couponCodes, setCouponCodes] = useState(''); const [focused, setFocused] = useState(false); + //topbutton + const handleTopButtonClick = useCallback(() => { + const container = scrollContainerRef?.current; + if (!container) return; + if (typeof container.scrollTo === 'function') { + scrollTop({ y: 0, animate: true }); + const timeOut = setTimeout(()=>{ + Spotlight.focus("product-detail-container-0"); + },100); + } + }, [ + scrollTop + ]); + useEffect(() => { dispatch( getProductCouponSearch({ @@ -1036,7 +1050,7 @@ export default function ProductAllSection({ const prevScrollTop = prevScrollTopRef.current; scrollPositionRef.current = currentScrollTop; - + // 기존 bottom 체크 로직 유지 if (documentHeight) { const isAtBottom = @@ -1102,7 +1116,6 @@ export default function ProductAllSection({ (e) => { const currentScrollTop = e.scrollTop; scrollPositionRef.current = currentScrollTop; - if (documentHeight) { const isAtBottom = currentScrollTop + 944 >= @@ -1152,7 +1165,7 @@ export default function ProductAllSection({ (descriptionRef.current?.scrollHeight || 0) + (reviewRef.current?.scrollHeight || 0) ); - }, [hasReviews, hasYouMayAlsoLike]); + }, [productDetailRef.current, descriptionRef.current, reviewRef.current]); // 스크롤 위치에 따른 MediaPanel 제어 (비디오 재생 중에는 자동 제어 안함 - unmount 시에만 정리) // useEffect(() => { @@ -1671,6 +1684,18 @@ export default function ProductAllSection({ )} + +
+ +
@@ -1682,7 +1707,7 @@ export default function ProductAllSection({ SCROLL DOWN

- )} + )} {/* COUPON POPUP */} {activePopup === Config.ACTIVE_POPUP.couponPopup && ( diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.module.less b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.module.less index 59e21f93..75f94b57 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.module.less +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.module.less @@ -961,3 +961,11 @@ } } } +.topButtonBox { + width:100%; + .tButton { + &:focus { + background-color: @PRIMARY_COLOR_RED; + } + } +} \ No newline at end of file