diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index d3e0236..fcb8e6f 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -9,6 +9,7 @@ interface ModalProps { containerClassName?: string; type?: "hidden" | "normal"; onClose?: () => void; + removeNoScroll?: boolean; } function Modal({ @@ -19,6 +20,7 @@ function Modal({ containerClassName = "", type = "normal", onClose, + removeNoScroll = true }: ModalProps): JSX.Element { const handleClose = (event: React.MouseEvent) => { if (event.target !== event.currentTarget) return; @@ -27,6 +29,10 @@ function Modal({ }; useEffect(() => { + if (!removeNoScroll) { + return; + } + if (open) { document.body.classList.add("no-scroll"); } @@ -34,7 +40,7 @@ function Modal({ return () => { document.body.classList.remove("no-scroll"); }; - }, [open]); + }, [open, removeNoScroll]); if (!open && type === "normal") return <>; return ( diff --git a/src/components/PaymentModalNew/PaymentCardModal/index.tsx b/src/components/PaymentModalNew/PaymentCardModal/index.tsx index 3bc937d..258a0a4 100644 --- a/src/components/PaymentModalNew/PaymentCardModal/index.tsx +++ b/src/components/PaymentModalNew/PaymentCardModal/index.tsx @@ -14,6 +14,7 @@ interface IPaymentCardModalProps { returnUrl?: string; isOpen: boolean; setIsOpen: Dispatch>; + removeNoScroll?: boolean; } export default function PaymentCardModal({ @@ -24,9 +25,10 @@ export default function PaymentCardModal({ returnUrl, isOpen, setIsOpen, + removeNoScroll, }: IPaymentCardModalProps) { return ( - setIsOpen(false)}> + setIsOpen(false)} removeNoScroll={removeNoScroll}> - +
+ +
{!isLoading && <>
diff --git a/src/components/palmistry/payment-screen/payment-screen.tsx b/src/components/palmistry/payment-screen/payment-screen.tsx index 853eeb7..13be936 100644 --- a/src/components/palmistry/payment-screen/payment-screen.tsx +++ b/src/components/palmistry/payment-screen/payment-screen.tsx @@ -46,6 +46,7 @@ export default function PaymentScreen() { const [minutes, seconds] = time.split(":"); + const returnUrl = window.location.origin + '/palmistry/payment'; return (
@@ -256,7 +257,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 f5b5124..ef23312 100644 --- a/src/components/palmistry/steps-manager/steps-manager.tsx +++ b/src/components/palmistry/steps-manager/steps-manager.tsx @@ -78,12 +78,14 @@ export default function StepsManager() { )}
- {nonSliderSteps.includes(steps.current as Step) && ( - - {steps.current === Step.Payment && } - {steps.current === Step.Discount && } - {steps.current === Step.PremiumBundle && } - + {(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) && (