/* /componens/plan.jsx */ 'use client'; import { useState } from 'react' function createMarkup(html) { return {__html: html} } function formatPrice(price) { return price / 100 } function formatInterval(interval, intervalCount) { return intervalCount > 1 ? `${intervalCount} ${interval}s` : interval } function IntervalSwitcher({ intervalValue, changeInterval }) { return (
Monthly
Yearly
); } function Plan({ plan, subscription, intervalValue }) { return (

{plan.variantName}

${formatPrice(plan.price)}   /{formatInterval(plan.interval, plan.intervalCount)}
Sign up
) } export default function Plans({ plans, subscription }) { const [intervalValue, setIntervalValue] = useState('month') return ( <>
{plans.map(plan => ( ))}

Payments are processed securely by Lemon Squeezy.

) }