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

You're signed up for updates

}
) }