import { useTranslations } from "@/hooks/translations"; import Price, { Currency, Locale } from "./Price"; import styles from "./styles.module.css"; import Countdown from "../Countdown"; type PaymentItem = { title: string; price: number; description: string; }; type PaymentTableProps = { currency: Currency; locale: Locale; items: PaymentItem[]; }; function PaymentTable({ currency, locale, items, }: PaymentTableProps): JSX.Element { const { translate } = useTranslations(); const total = items.reduce((acc, item) => acc + item.price, 0); const totalPrice = new Price(total, currency, locale); const toItem = (item: (typeof items)[0], idx: number) => { const price = new Price(item.price, currency, locale); return (
{item.description}
{/*One dollar thirty six cents per day
*/}