[구매 옵션 노출관련 처리] #1
- option노출부분에서의 hasMockOption부분 제거 - checkout넘어갔을시에 목데이터 노출되는부분 변경.
This commit is contained in:
@@ -1,27 +1,42 @@
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react';
|
||||
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import {
|
||||
useDispatch,
|
||||
useSelector,
|
||||
} from 'react-redux';
|
||||
|
||||
import Spotlight from '@enact/spotlight';
|
||||
import SpotlightContainerDecorator from '@enact/spotlight/SpotlightContainerDecorator';
|
||||
import SpotlightContainerDecorator
|
||||
from '@enact/spotlight/SpotlightContainerDecorator';
|
||||
import Spottable from '@enact/spotlight/Spottable';
|
||||
|
||||
import { setHidePopup, setShowPopup } from '../../../actions/commonActions';
|
||||
import {
|
||||
setHidePopup,
|
||||
setShowPopup,
|
||||
} from '../../../actions/commonActions';
|
||||
import { sendLogTotalRecommend } from '../../../actions/logActions';
|
||||
import { popPanel } from '../../../actions/panelActions';
|
||||
import TButton from '../../../components/TButton/TButton';
|
||||
import TPopUp from '../../../components/TPopUp/TPopUp';
|
||||
import TQRCode from '../../../components/TQRCode/TQRCode';
|
||||
import useScrollTo from '../../../hooks/useScrollTo';
|
||||
import useScrollTopByDistance from '../../../hooks/useScrollTopByDistance';
|
||||
import { BUYNOW_CONFIG } from '../../../utils/BuyNowConfig';
|
||||
import * as Config from '../../../utils/Config';
|
||||
import { $L, getQRCodeUrl } from '../../../utils/helperMethods';
|
||||
import {
|
||||
$L,
|
||||
getQRCodeUrl,
|
||||
} from '../../../utils/helperMethods';
|
||||
import BillingAddressCard from '../components/BillingAddressCard';
|
||||
import PaymentCard from '../components/PaymentCard';
|
||||
import ShippingAddressCard from '../components/ShippingAddressCard';
|
||||
import Subject from '../components/Subject';
|
||||
import css from './InformationContainer.module.less';
|
||||
import { sendLogTotalRecommend } from '../../../actions/logActions';
|
||||
import { BUYNOW_CONFIG } from '../../../utils/BuyNowConfig';
|
||||
|
||||
const Container = SpotlightContainerDecorator({ enterTo: 'last-focused' }, 'div');
|
||||
|
||||
@@ -282,9 +297,12 @@ export default function InformationContainer({
|
||||
ADD/EDIT
|
||||
</TButton>
|
||||
{/* BillingAddressCard disabled due to infinite render loop in Mock Mode */}
|
||||
<div style={{ padding: '10px', textAlign: 'center', color: '#999' }}>
|
||||
{/* <div style={{ padding: '10px', textAlign: 'center', color: '#999' }}>
|
||||
Mock Billing Address
|
||||
</div>
|
||||
</div> */}
|
||||
{checkoutData?.billingAddressList && (
|
||||
<BillingAddressCard list={checkoutData.billingAddressList} onFocus={handleFocus} />
|
||||
)}
|
||||
</div>
|
||||
<div className={css.listBox}>
|
||||
<Subject title="PATMENT METHOD" />
|
||||
|
||||
@@ -33,7 +33,10 @@ import {
|
||||
popPanel,
|
||||
pushPanel,
|
||||
} from '../../../actions/panelActions';
|
||||
import { clearAllVideoTimers, finishVideoPreview } from '../../../actions/playActions';
|
||||
import {
|
||||
clearAllVideoTimers,
|
||||
finishVideoPreview,
|
||||
} from '../../../actions/playActions';
|
||||
import {
|
||||
getProductOption,
|
||||
getProductOptionId,
|
||||
@@ -463,7 +466,7 @@ const BuyOption = ({
|
||||
});
|
||||
|
||||
// API Mode: 실제 API 호출
|
||||
if (!isMockMode) {
|
||||
if (!isMockMode) {
|
||||
// ⚠️ 필수 값 검증
|
||||
if (!selectedPatnrId || !selectedPrdtId) {
|
||||
console.warn('[BuyOption] ⚠️ [getProductOption] MISSING REQUIRED PARAMS', {
|
||||
@@ -550,7 +553,7 @@ const BuyOption = ({
|
||||
|
||||
if (response) {
|
||||
if (response.retCode === 0) {
|
||||
// 🔍 조건 체크
|
||||
// 🔍 조건 체크
|
||||
const isCardInfoNull = response.data.cardInfo === null;
|
||||
const isBillingAddressEmpty = response.data.billingAddressList.length === 0;
|
||||
const isShippingAddressEmpty = response.data.shippingAddressList.length === 0;
|
||||
@@ -623,7 +626,7 @@ const BuyOption = ({
|
||||
response.retDetailCode,
|
||||
response.returnBindStrings
|
||||
)
|
||||
);
|
||||
);
|
||||
dispatch(changeAppStatus({ isLoading: false }));
|
||||
return;
|
||||
}
|
||||
@@ -1405,7 +1408,7 @@ const BuyOption = ({
|
||||
{/* 동적 옵션 렌더링 */}
|
||||
{productOptionInfos &&
|
||||
productOptionInfos?.length > 0 &&
|
||||
(productInfo?.optProdYn === 'Y' || hasMockOptions) && (
|
||||
productInfo?.optProdYn === 'Y' && (
|
||||
<>
|
||||
{/* 첫번째 옵션 (여러 옵션이 있을 때만) */}
|
||||
{productOptionInfos?.length > 1 && (
|
||||
|
||||
Reference in New Issue
Block a user