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) && (