[251112] feat: views - ShopNowContents.jsx - 기능 개선

🕐 커밋 시간: 2025. 11. 12. 11:53:27

📊 변경 통계:
  • 총 파일: 1개
  • 추가: +12줄
  • 삭제: -3줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx
This commit is contained in:
2025-11-12 11:53:28 +09:00
parent 9c52cc0e03
commit 5d8857c06f

View File

@@ -53,6 +53,15 @@ export default function ShopNowContents({
const [height, setHeight] = useState();
const gridStyle = useMemo(() => ({ height: `${height}px` }), [height]);
useEffect(() => {
console.log('=== [ShopNow] Component Rendered ===');
console.log('[ShopNow] shopNowInfo:', shopNowInfo);
console.log('[ShopNow] youmaylikeInfos:', youmaylikeInfos);
console.log('[ShopNow] version:', version);
console.log('[ShopNow] tabIndex:', tabIndex);
console.log('=====================================');
}, [shopNowInfo, youmaylikeInfos, version, tabIndex]);
// ShopNow + YouMayLike 통합 아이템 (v2이고 shopNow < 3일 때만)
const combinedItems = useMemo(() => {
if (!shopNowInfo) return [];
@@ -62,10 +71,10 @@ export default function ShopNowContents({
...item,
_type: 'shopnow',
}));
// v2 + ShopNow < 3 + YouMayLike 데이터 존재 시 통합
// if (version === 2 && shopNowInfo.length < 3 && youmaylikeInfos && youmaylikeInfos.length > 0) {
if (version === 2 && youmaylikeInfos && youmaylikeInfos.length > 0) {
// for Test => if (version === 2 && youmaylikeInfos && youmaylikeInfos.length > 0) {
if (version === 2 && shopNowInfo.length < 3 && youmaylikeInfos && youmaylikeInfos.length > 0) {
items = items.concat(
youmaylikeInfos.map((item) => ({
...item,