[MobileSendPopUp]

- input 클릭 후 숫자 기재시 undefined 라고 표시되는 현상 수정
- last recentNumber 삭제 시 input 초기화 처리
- getDeviceAdditionInfo 호출 예외처리
- terms 문구 1.0 버전으로 수정
This commit is contained in:
jiwon93.son
2024-07-15 17:47:14 +09:00
parent a9adcac271
commit 8ad30e273f
2 changed files with 53 additions and 34 deletions

View File

@@ -222,5 +222,5 @@
"If you do not wish to agree to these terms, please proceed to the LG Account.": "If you do not wish to agree to these terms, please proceed to the LG Account.",
"If you do not wish to agree to these terms, please proceed to the following link.": "If you do not wish to agree to these terms, please proceed to the following link.",
"Click the screen to see more products!": "Click the screen to see more products!",
"By clicking Agree and Send button, I agree that LGE may collect and store my cell phone number to send text messages as I requested, for data analysis and for feature-enhancement purposes. By entering my cell phone number, I agree to receive messages from LGE with information on how to purchase the product I selected. Message and data rates may apply.": "By clicking \"Agree and Send\" button, I agree that LGE may collect and store my cell phone number to send text messages as I requested, for data analysis and for feature-enhancement purposes. \n By entering my cell phone number, I agree to receive messages from LGE with information on how to purchase the product I selected. Message and data rates may apply."
"By clicking Agree and Send button, I agree that LGE may collect and store my cell phone number to send text messages as I requested, for data analysis and for feature-enhancement purposes. By entering my cell phone number, I agree to receive messages from LGE with information on how to purchase the product I selected. Message and data rates may apply.": "By clicking \"Agree and Send\" button, I agree that LGE may collect and store my cell phone number to send text messages as I requested, for data analysis and for feature-enhancement purposes. <br/> By entering my cell phone number, I agree to receive messages from LGE with information on how to purchase the product I selected. Message and data rates may apply."
}

View File

@@ -1,44 +1,63 @@
import React, { useCallback, useEffect, useMemo, useState } from "react";
import React, {
useCallback,
useEffect,
useMemo,
useState,
} from 'react';
import classNames from "classnames";
import classNames from 'classnames';
import {
AsYouTypeFormatter,
PhoneNumberFormat,
PhoneNumberUtil,
} from "google-libphonenumber";
import { useDispatch, useSelector } from "react-redux";
} from 'google-libphonenumber';
import {
useDispatch,
useSelector,
} from 'react-redux';
import { off, on } from "@enact/core/dispatcher";
import spotlight, { Spotlight } from "@enact/spotlight";
import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator";
import { Spottable } from "@enact/spotlight/Spottable";
import {
off,
on,
} from '@enact/core/dispatcher';
import spotlight, { Spotlight } from '@enact/spotlight';
import {
SpotlightContainerDecorator,
} from '@enact/spotlight/SpotlightContainerDecorator';
import { Spottable } from '@enact/spotlight/Spottable';
import defaultImage from "../../../assets/images/img-thumb-empty-144@3x.png";
import { types } from "../../actions/actionTypes";
import { clearSMS, sendSms } from "../../actions/appDataActions";
import defaultImage from '../../../assets/images/img-thumb-empty-144@3x.png';
import { types } from '../../actions/actionTypes';
import {
clearSMS,
sendSms,
} from '../../actions/appDataActions';
import {
changeLocalSettings,
setHidePopup,
setShowPopup,
} from "../../actions/commonActions";
} from '../../actions/commonActions';
import {
clearRegisterDeviceInfo,
getDeviceAdditionInfo,
registerDeviceInfo,
} from "../../actions/deviceActions";
} from '../../actions/deviceActions';
import {
clearCurationCoupon,
setEventIssueReq,
} from "../../actions/eventActions";
import useLogService from "../../hooks/useLogService";
import { ACTIVE_POPUP, LOG_TP_NO } from "../../utils/Config";
import { $L } from "../../utils/helperMethods";
import CustomImage from "../CustomImage/CustomImage";
import TButton from "../TButton/TButton";
import TPopUp from "../TPopUp/TPopUp";
import HistoryPhoneNumber from "./HistoryPhoneNumber/HistoryPhoneNumber";
import css from "./MobileSendPopUp.module.less";
import SMSNumKeyPad from "./SMSNumKeyPad";
} from '../../actions/eventActions';
import useLogService from '../../hooks/useLogService';
import {
ACTIVE_POPUP,
LOG_TP_NO,
} from '../../utils/Config';
import { $L } from '../../utils/helperMethods';
import CustomImage from '../CustomImage/CustomImage';
import TButton from '../TButton/TButton';
import TPopUp from '../TPopUp/TPopUp';
import HistoryPhoneNumber from './HistoryPhoneNumber/HistoryPhoneNumber';
import css from './MobileSendPopUp.module.less';
import SMSNumKeyPad from './SMSNumKeyPad';
const Container = SpotlightContainerDecorator(
{ enterTo: "last-focused" },
@@ -117,7 +136,11 @@ export default function MobileSendPopUp({
const handleInputClick = () => {
setKeyPadOff(false);
if (recentSentNumber) setMobileNumber(recentSentNumber[0]);
if (recentSentNumber && recentSentNumber.length > 0) {
setMobileNumber(recentSentNumber[0]);
} else {
setMobileNumber("");
}
};
const getRawPhoneNumber = useCallback(
@@ -217,8 +240,10 @@ export default function MobileSendPopUp({
}, [handleKeydown]);
useEffect(() => {
if (!deviceInfo) {
dispatch(getDeviceAdditionInfo());
}, [dispatch]);
}
}, [deviceInfo, dispatch]);
useEffect(() => {
if (phoneNumberList) setRecentSentNumber(phoneNumberList);
@@ -579,13 +604,7 @@ export default function MobileSendPopUp({
<div className={css.instruction}>
<span>
{$L(
"By clicking Agree and Send button below, I agree that LGE may collect and store my mobile number to send text messages as I requested, for data analysis, and for feature-enhancement purposes."
)}
</span>
<br />
<span>
{$L(
"By entering my mobile number, I agree to receive messages from LGE with information on how to purchase the product I selected. Message and data rates may apply."
"By clicking Agree and Send button, I agree that LGE may collect and store my cell phone number to send text messages as I requested, for data analysis and for feature-enhancement purposes. By entering my cell phone number, I agree to receive messages from LGE with information on how to purchase the product I selected. Message and data rates may apply."
)}
</span>
</div>