diff --git a/com.twin.app.shoptime/src/views/DetailPanel/SingleProduct/SingleOption.jsx b/com.twin.app.shoptime/src/views/DetailPanel/SingleProduct/SingleOption.jsx index 5b85ff8a..73e0882c 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/SingleProduct/SingleOption.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/SingleProduct/SingleOption.jsx @@ -4,45 +4,53 @@ import React, { useMemo, useRef, useState, -} from "react"; +} from 'react'; -import classNames from "classnames"; -import { useDispatch, useSelector } from "react-redux"; +import classNames from 'classnames'; +import { + useDispatch, + useSelector, +} from 'react-redux'; -import { log } from "@enact/core/handle"; -import Spotlight from "@enact/spotlight"; -import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; -import Spottable from "@enact/spotlight/Spottable"; +import { log } from '@enact/core/handle'; +import Spotlight from '@enact/spotlight'; +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; +import Spottable from '@enact/spotlight/Spottable'; -import { getMyInfoCheckoutInfo } from "../../../actions/checkoutActions"; +import { getMyInfoCheckoutInfo } from '../../../actions/checkoutActions'; import { launchMembershipApp, setHidePopup, setShowPopup, -} from "../../../actions/commonActions"; +} from '../../../actions/commonActions'; import { getProductCouponDownload, getProductCouponSearch, getProductCouponTotDownload, -} from "../../../actions/couponActions"; -import { sendLogPaymentEntry } from "../../../actions/logActions"; -import { pushPanel } from "../../../actions/panelActions"; +} from '../../../actions/couponActions'; +import { sendLogPaymentEntry } from '../../../actions/logActions'; +import { pushPanel } from '../../../actions/panelActions'; import { getProductOption, getProductOptionId, -} from "../../../actions/productActions"; -import TButton from "../../../components/TButton/TButton"; -import TPopUp from "../../../components/TPopUp/TPopUp"; -import TQRCode from "../../../components/TQRCode/TQRCode"; -import TScroller from "../../../components/TScroller/TScroller"; -import TVirtualGridList from "../../../components/TVirtualGridList/TVirtualGridList"; -import usePriceInfo from "../../../hooks/usePriceInfo"; -import * as Config from "../../../utils/Config"; -import { $L, getQRCodeUrl } from "../../../utils/helperMethods"; -import { SpotlightIds } from "../../../utils/SpotlightIds"; -import FavoriteBtn from "../components/FavoriteBtn"; -import BillingProductPrice from "./BillingProductPrice/BillingProductPrice"; -import css from "./SingleOption.module.less"; +} from '../../../actions/productActions'; +import TButton from '../../../components/TButton/TButton'; +import TPopUp from '../../../components/TPopUp/TPopUp'; +import TQRCode from '../../../components/TQRCode/TQRCode'; +import TScroller from '../../../components/TScroller/TScroller'; +import TVirtualGridList + from '../../../components/TVirtualGridList/TVirtualGridList'; +import usePriceInfo from '../../../hooks/usePriceInfo'; +import * as Config from '../../../utils/Config'; +import { + $L, + getQRCodeUrl, +} from '../../../utils/helperMethods'; +import { SpotlightIds } from '../../../utils/SpotlightIds'; +import FavoriteBtn from '../components/FavoriteBtn'; +import BillingProductPrice from './BillingProductPrice/BillingProductPrice'; +import css from './SingleOption.module.less'; const Container = SpotlightContainerDecorator( { enterTo: "default-element" }, @@ -292,15 +300,6 @@ export default function SingleOption({ ] ); - useEffect(() => { - if (productOptionInfos) { - console.log("#productOptionInfos", productOptionInfos.length); - } - if (promotions) { - console.log("#promotions", promotions, promotions.length); - } - }, [productOptionInfos, promotions]); - const handleLoginPopUpOpen = useCallback(() => { if (hasOnClose) { dispatch(setHidePopup()); diff --git a/com.twin.app.shoptime/src/views/DetailPanel/components/FavoriteBtn.jsx b/com.twin.app.shoptime/src/views/DetailPanel/components/FavoriteBtn.jsx index 0fb99b2e..30cf1175 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/components/FavoriteBtn.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/components/FavoriteBtn.jsx @@ -1,21 +1,30 @@ -import React, { useCallback, useEffect } from "react"; +import React, { + useCallback, + useEffect, +} from 'react'; -import classNames from "classnames"; -import { useDispatch, useSelector } from "react-redux"; +import classNames from 'classnames'; +import { + useDispatch, + useSelector, +} from 'react-redux'; -import Spotlight from "@enact/spotlight"; +import Spotlight from '@enact/spotlight'; -import { setHidePopup, setShowPopup } from "../../../actions/commonActions"; +import { + setHidePopup, + setShowPopup, +} from '../../../actions/commonActions'; import { getMyFavoriteFlag, setMainLikeCategory, -} from "../../../actions/mainActions"; -import { deleteMyFavorite } from "../../../actions/myPageActions"; -import TButton from "../../../components/TButton/TButton"; -import TPopUp from "../../../components/TPopUp/TPopUp"; -import * as Config from "../../../utils/Config"; -import { $L } from "../../../utils/helperMethods"; -import css from "./FavoriteBtn.module.less"; +} from '../../../actions/mainActions'; +import { deleteMyFavorite } from '../../../actions/myPageActions'; +import TButton from '../../../components/TButton/TButton'; +import TPopUp from '../../../components/TPopUp/TPopUp'; +import * as Config from '../../../utils/Config'; +import { $L } from '../../../utils/helperMethods'; +import css from './FavoriteBtn.module.less'; export default function FavoriteBtn({ selectedPatnrId, selectedPrdtId }) { const dispatch = useDispatch(); @@ -32,8 +41,6 @@ export default function FavoriteBtn({ selectedPatnrId, selectedPrdtId }) { ); }, [selectedPatnrId, selectedPrdtId]); - useEffect(() => {}, [favoriteFlagData]); - const handleFavoriteClick = useCallback(() => { switch (favoriteFlagData.favorFlag) { case "N":