From 7652b17e805549296bb68b4a2987cb52e3b4b176 Mon Sep 17 00:00:00 2001 From: yury Date: Sat, 29 Jun 2024 06:03:54 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=20=D0=94=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=20=D0=BF=D1=80=D0=B5=D0=BF=D1=80=D0=BE=D0=B3?= =?UTF-8?q?=D1=80=D1=83=D0=B7=D0=BA=D1=83=20=D0=BE=D0=BF=D0=BB=D0=B0=D1=82?= =?UTF-8?q?=D1=8B"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 49cea63a9503f583f949f6b91a6d60f0e016766d. --- src/components/Modal/index.tsx | 8 +------ .../PaymentCardModal/index.tsx | 4 +--- src/components/PaymentModalNew/index.tsx | 21 ++++++++----------- .../payment-screen/payment-screen.tsx | 3 +-- .../palmistry/steps-manager/steps-manager.tsx | 14 ++++++------- 5 files changed, 18 insertions(+), 32 deletions(-) diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index fcb8e6f..d3e0236 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -9,7 +9,6 @@ interface ModalProps { containerClassName?: string; type?: "hidden" | "normal"; onClose?: () => void; - removeNoScroll?: boolean; } function Modal({ @@ -20,7 +19,6 @@ function Modal({ containerClassName = "", type = "normal", onClose, - removeNoScroll = true }: ModalProps): JSX.Element { const handleClose = (event: React.MouseEvent) => { if (event.target !== event.currentTarget) return; @@ -29,10 +27,6 @@ function Modal({ }; useEffect(() => { - if (!removeNoScroll) { - return; - } - if (open) { document.body.classList.add("no-scroll"); } @@ -40,7 +34,7 @@ function Modal({ return () => { document.body.classList.remove("no-scroll"); }; - }, [open, removeNoScroll]); + }, [open]); if (!open && type === "normal") return <>; return ( diff --git a/src/components/PaymentModalNew/PaymentCardModal/index.tsx b/src/components/PaymentModalNew/PaymentCardModal/index.tsx index 258a0a4..3bc937d 100644 --- a/src/components/PaymentModalNew/PaymentCardModal/index.tsx +++ b/src/components/PaymentModalNew/PaymentCardModal/index.tsx @@ -14,7 +14,6 @@ interface IPaymentCardModalProps { returnUrl?: string; isOpen: boolean; setIsOpen: Dispatch>; - removeNoScroll?: boolean; } export default function PaymentCardModal({ @@ -25,10 +24,9 @@ export default function PaymentCardModal({ returnUrl, isOpen, setIsOpen, - removeNoScroll, }: IPaymentCardModalProps) { return ( - setIsOpen(false)} removeNoScroll={removeNoScroll}> + setIsOpen(false)}> -
- -
+ {!isLoading && <>
diff --git a/src/components/palmistry/payment-screen/payment-screen.tsx b/src/components/palmistry/payment-screen/payment-screen.tsx index 13be936..853eeb7 100644 --- a/src/components/palmistry/payment-screen/payment-screen.tsx +++ b/src/components/palmistry/payment-screen/payment-screen.tsx @@ -46,7 +46,6 @@ export default function PaymentScreen() { const [minutes, seconds] = time.split(":"); - const returnUrl = window.location.origin + '/palmistry/payment'; return (
@@ -257,7 +256,7 @@ export default function PaymentScreen() { )} diff --git a/src/components/palmistry/steps-manager/steps-manager.tsx b/src/components/palmistry/steps-manager/steps-manager.tsx index ef23312..f5b5124 100644 --- a/src/components/palmistry/steps-manager/steps-manager.tsx +++ b/src/components/palmistry/steps-manager/steps-manager.tsx @@ -78,14 +78,12 @@ export default function StepsManager() { )}
- {(nonSliderSteps.includes(steps.current as Step) || steps.current === Step.Paywall) && ( -
- - {[Step.Paywall, Step.Payment].includes(steps.current as Step) && } - {steps.current === Step.Discount && } - {steps.current === Step.PremiumBundle && } - -
+ {nonSliderSteps.includes(steps.current as Step) && ( + + {steps.current === Step.Payment && } + {steps.current === Step.Discount && } + {steps.current === Step.PremiumBundle && } + )} {!nonSliderSteps.includes(steps.current as Step) && (