[주문결제] detail Buy now 클릭 시에 refresh 되어 qr code 적재되지 않던 현상 수정
This commit is contained in:
@@ -9,7 +9,8 @@ export const getMyInfoCheckoutInfo =
|
||||
const { mbrNo, dirPurcSelYn, cartList } = props;
|
||||
|
||||
dispatch(
|
||||
changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } })
|
||||
// changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } })
|
||||
changeAppStatus({ isLoading: true })
|
||||
);
|
||||
|
||||
const onSuccess = (response) => {
|
||||
|
||||
@@ -1,24 +1,36 @@
|
||||
import React, { useCallback, useRef, useEffect } from "react";
|
||||
import React, { useCallback, useEffect, useRef } from "react";
|
||||
|
||||
import classNames from "classnames";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
|
||||
import { Cancelable } from "@enact/ui/Cancelable";
|
||||
|
||||
import { popPanel } from "../../actions/panelActions";
|
||||
import { SpotlightIds } from "../../utils/SpotlightIds";
|
||||
import SmoodShowingAnimation from "../SmoodShowingAnimation/SmoodShowingAnimation";
|
||||
import css from "./TPanel.module.less";
|
||||
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
|
||||
|
||||
const CancelablePanel = Cancelable({ modal: true, onCancel: "handleCancel" }, SpotlightContainerDecorator({ enterTo: "last-focused" }, "div"));
|
||||
const CancelablePanel = Cancelable(
|
||||
{ modal: true, onCancel: "handleCancel" },
|
||||
SpotlightContainerDecorator({ enterTo: "last-focused" }, "div")
|
||||
);
|
||||
|
||||
const PERFORMANCE_CHECHING_TIME = 200; //ms
|
||||
const PERFORMANCE_CHECHING_COUNT = 7;
|
||||
const TPanel = ({ className, children, handleCancel, isTabActivated = true, spotlightId = SpotlightIds.TPANEL, isOnTop = false, ...rest }) => {
|
||||
const TPanel = ({
|
||||
className,
|
||||
children,
|
||||
handleCancel,
|
||||
isTabActivated = true,
|
||||
spotlightId = SpotlightIds.TPANEL,
|
||||
isOnTop = false,
|
||||
...rest
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const isGnbOpened = useSelector((state) => state.common.isGnbOpened);
|
||||
const isLoading = useSelector((state) => state.common.appStatus.isLoading);
|
||||
|
||||
const onCancel = useCallback(
|
||||
(e) => {
|
||||
@@ -41,8 +53,13 @@ const TPanel = ({ className, children, handleCancel, isTabActivated = true, spot
|
||||
{...rest}
|
||||
id={SpotlightIds.TPANEL}
|
||||
handleCancel={onCancel}
|
||||
className={classNames(css.tpanelmain, isTabActivated && css.isTabActivated, className)}
|
||||
className={classNames(
|
||||
css.tpanelmain,
|
||||
isTabActivated && css.isTabActivated,
|
||||
className
|
||||
)}
|
||||
spotlightId={spotlightId}
|
||||
spotlightDisabled={isLoading}
|
||||
>
|
||||
{children}
|
||||
</CancelablePanel>
|
||||
|
||||
@@ -136,7 +136,7 @@ export default function SingleOption({
|
||||
};
|
||||
|
||||
setPrdtData(params);
|
||||
}, []);
|
||||
}, [selectedPatnrId, selectedPrdtId, selectedOptions, quantity]);
|
||||
|
||||
const logInfo = useMemo(() => {
|
||||
if (productData) {
|
||||
@@ -388,7 +388,8 @@ export default function SingleOption({
|
||||
response.data.shippingAddressList.length === 0
|
||||
) {
|
||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.qrPopup));
|
||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
// dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
dispatch(changeAppStatus({ isLoading: false }));
|
||||
|
||||
return;
|
||||
} else {
|
||||
@@ -406,10 +407,12 @@ export default function SingleOption({
|
||||
}
|
||||
} else if (response.retCode === 1001) {
|
||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.qrPopup));
|
||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
// dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
dispatch(changeAppStatus({ isLoading: false }));
|
||||
} else {
|
||||
dispatch(showError(response.retCode, response.retMsg, false));
|
||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
// dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
dispatch(changeAppStatus({ isLoading: false }));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user