'use client' import { useState } from 'react' export default function Signup() { const [email, setEmail] = useState('') const [submitting, setSubmitting] = useState(false) const [success, setSuccess] = useState(false) return (
{ e.preventDefault() setSubmitting(true) await fetch('/api/signup', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ email }), }) setSubmitting(false) setSuccess(true) setEmail('') return false }} className='flex self-stretch flex-col gap-3 h-32 md:mx-40 lg:mx-72' > setEmail(e.target.value)} type='email' placeholder='your@email.com' className='border border-neutral-200 rounded-lg px-4 py-2 focus:outline-none placeholder-neutral-300' /> {success &&

You're signed up for updates

}
) }