diff --git a/com.twin.app.shoptime/resources/en/strings.json b/com.twin.app.shoptime/resources/en/strings.json index dab1d9cf..83ba940e 100644 --- a/com.twin.app.shoptime/resources/en/strings.json +++ b/com.twin.app.shoptime/resources/en/strings.json @@ -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.
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." } diff --git a/com.twin.app.shoptime/src/components/MobileSend/MobileSendPopUp.jsx b/com.twin.app.shoptime/src/components/MobileSend/MobileSendPopUp.jsx index 4c2e58bd..bd1504d7 100644 --- a/com.twin.app.shoptime/src/components/MobileSend/MobileSendPopUp.jsx +++ b/com.twin.app.shoptime/src/components/MobileSend/MobileSendPopUp.jsx @@ -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(() => { - dispatch(getDeviceAdditionInfo()); - }, [dispatch]); + if (!deviceInfo) { + dispatch(getDeviceAdditionInfo()); + } + }, [deviceInfo, dispatch]); useEffect(() => { if (phoneNumberList) setRecentSentNumber(phoneNumberList); @@ -579,13 +604,7 @@ export default function MobileSendPopUp({
{$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." - )} - -
- - {$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." )}