import Title from "@/components/Title"; import styles from "./styles.module.css"; import { useSelector } from "react-redux"; import { selectors } from "@/store"; import { IPaywallProduct } from "@/api/resources/Paywall"; const getPrice = (product: IPaywallProduct | null) => { if (!product) { return 0; } return (product.trialPrice === 100 ? 99 : product.trialPrice || 0) / 100; }; function PaymentDiscountTable() { const activeProduct = useSelector(selectors.selectActiveProduct); return (
No pressure. Cancel anytime.
Secret discount applied!
Your cost per 14 days after trial:
You save $30
Total today:
{activeProduct && ${getPrice(activeProduct)}}