import { useEffect, useState } from 'preact/hooks'; import { ProBadge } from './ProBadge'; import { HStack, Stack, VStack } from './Stack'; import Switch from './Switch'; import { alertsService } from '../notifications'; import { A, Button } from './common'; import { useCheckout } from '../hooks/useCheckout'; import { Text } from './Text'; import { Icon } from './Icons'; export function Pro({ user }) { const hasCheckoutLoaded = useCheckout(); useEffect(() => { if (hasCheckoutLoaded) { window.LemonSqueezy.Setup({ eventHandler: e => { console.log('eventHandler', e); if (e.event === 'Checkout.Success') { window.location.reload(); } } }); window.LemonSqueezy.Refresh(); } }, [hasCheckoutLoaded]); return ( Go } features={[ 'Unlimited private creations', 'Unlimited public creations', 'Unlimited files mode creations', 'Asset hosting', 'Priority support', 'No Ads' ]} /> ); } const Card = ({ bg, name, price, action, features }) => { return (
{name} {' '} {price} {action} {!action && ( )} {features.map(f => ( {f} ))}
); };