diff --git a/components/FooterSection.tsx b/components/FooterSection.tsx index f9b5b31..5e3b045 100644 --- a/components/FooterSection.tsx +++ b/components/FooterSection.tsx @@ -1,8 +1,31 @@ +import { useState } from 'react' import MangoPill from '../components/MangoPill' import Button from './Button' -import GradientText from './GradientText' + +const doNothing = (e) => { + e.stopPropagation() +} const FooterSection = () => { + const [done, setDone] = useState(false) + const [email, setEmail] = useState('') + + const handleChange = (e) => { + setEmail(e.target.value) + } + + const handleSubmit = async (e) => { + e.preventDefault() + + await fetch('/api/signup', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ email }), + }) + + setDone(true) + } + return (
@@ -10,44 +33,52 @@ const FooterSection = () => {

Want product news and updates?{' '} - + Sign up for our newsletter. - +

-
+ - -
- -
+ {done ? ( + Thank you for signing up! 🎉 + ) : ( + <> + +
+ +
+ + )}
-

+

We promise to never spam and only send alpha.

-