import Title from "@/components/Title"; import styles from "./styles.module.css"; import ReservedTimer from "./components/ReservedTimer"; import MainButton from "@/components/MainButton"; import Modal from "@/components/Modal"; import PaymentModal from "@/components/PaymentModal"; import { useEffect, useState } from "react"; import { usePaywall } from "@/hooks/paywall/usePaywall"; import { EPlacementKeys } from "@/api/resources/Paywall"; import { useDispatch, useSelector } from "react-redux"; import { actions, selectors } from "@/store"; function MarketingTrialPayment() { const dispatch = useDispatch(); const [isOpenPaymentModal, setIsOpenPaymentModal] = useState(false); const activeProduct = useSelector(selectors.selectActiveProduct); const { products, getText } = usePaywall({ placementKey: EPlacementKeys["aura.placement.email.marketing"], }); useEffect(() => { dispatch(actions.payment.update({ activeProduct: products[0] })); }, [dispatch, products]); const openStripeModal = () => { setIsOpenPaymentModal(true); }; const handleCloseModal = () => { setIsOpenPaymentModal(false); }; return ( <> {products[0] && ( )}
Special Offer
Start your {activeProduct?.trialDuration}-day trial

No pressure. Cancel anytime

Total today:

${((products[0]?.trialPrice || 0) / 100).toFixed(2) || 0}

Code applied!

Your cost per 2 weeks after trial

${Number(getText("full.price")) / 100} ${(activeProduct?.price || 0) / 100}

{getText("text.save")}

You will be charged only{" "} ${((products[0]?.trialPrice || 0) / 100).toFixed(2) || 0} for your{" "} {activeProduct?.trialDuration}-day trial. {" "} Subscription renews automatically until cancelled. You{" "} can cancel at any time before the end of the trial.

Credit card

Get access

By continuing you agree that if you don`t cancel prior to the end of the {activeProduct?.trialDuration}-days trial, you will automatically be charged ${(activeProduct?.price || 0) / 100} every 2 weeks until you cancel in settings. Learn more about cancellation and refund policy in Subscription terms

); } export default MarketingTrialPayment;