Possibly fix checkbox

This commit is contained in:
Matthew Stanciu 2020-04-24 11:31:51 -04:00
parent fffe30a674
commit c87cb0fc87
2 changed files with 2 additions and 1 deletions

View file

@ -77,7 +77,7 @@ const JoinForm = () => {
<Checkbox
name="teen"
sx={{ color: 'muted' }}
onChange={(e) => { console.log(e.target.checked); setTeen(e.target.checked) }}
onChange={(e) => { console.log(e.target.checked); setTeen(currentTeen => !currentTeen) }}
/>
Are you a teenager?
</Label>

View file

@ -9,6 +9,7 @@ const joinTable = new AirtablePlus({
export default async (req, res) => {
if (req.method === 'POST') {
const data = JSON.parse(req.body)
console.log(data)
await joinTable.create({
'Full Name': data.name,
'Email Address': data.email,