[251019] fix: PlayerPanel Optimization-1
🕐 커밋 시간: 2025. 10. 19. 21:45:39 📊 변경 통계: • 총 파일: 11개 • 추가: +119줄 • 삭제: -101줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/productActions.js ~ com.twin.app.shoptime/src/components/VideoPlayer/MediaPlayer.jsx ~ com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js ~ com.twin.app.shoptime/src/hooks/useReviews/useReviews.js ~ com.twin.app.shoptime/src/reducers/productReducer.js ~ com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/UserReviews/UserReviews.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/FeaturedShowContents.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/LiveChannelContents.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx 🔧 함수 변경 내용: 📄 com.twin.app.shoptime/src/actions/productActions.js (javascript): 🔄 Modified: resetShowAllReviews() 📄 com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/UserReviews/UserReviews.jsx (javascript): 🔄 Modified: SpotlightContainerDecorator() 📄 com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.jsx (javascript): ❌ Deleted: handleTabOnClick() 📄 com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx (javascript): 🔄 Modified: Spottable() 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선 • UI 컴포넌트 아키텍처 개선
This commit is contained in:
@@ -29,6 +29,8 @@ export default function LiveChannelContents({
|
||||
}) {
|
||||
const dispatch = useDispatch();
|
||||
const isClickBlocked = useRef(false);
|
||||
const blockTimeoutRef = useRef(null);
|
||||
|
||||
const handleFocus = useCallback(
|
||||
() => () => {
|
||||
if (handleItemFocus) {
|
||||
@@ -75,8 +77,15 @@ export default function LiveChannelContents({
|
||||
}
|
||||
|
||||
isClickBlocked.current = true;
|
||||
setTimeout(() => {
|
||||
|
||||
// 이전 타이머가 있으면 정리
|
||||
if (blockTimeoutRef.current) {
|
||||
clearTimeout(blockTimeoutRef.current);
|
||||
}
|
||||
|
||||
blockTimeoutRef.current = setTimeout(() => {
|
||||
isClickBlocked.current = false;
|
||||
blockTimeoutRef.current = null;
|
||||
}, 600);
|
||||
|
||||
if (!showId) return;
|
||||
@@ -144,6 +153,15 @@ export default function LiveChannelContents({
|
||||
|
||||
const containerClass = version === 2 ? cssV2.container : css.container;
|
||||
|
||||
// cleanup useEffect
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
if (blockTimeoutRef.current) {
|
||||
clearTimeout(blockTimeoutRef.current);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={containerClass}>
|
||||
|
||||
Reference in New Issue
Block a user