From 65e9ad57511725473bcd5718e5bf84c580d05794 Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Thu, 18 Jun 2020 08:01:21 -0400 Subject: [PATCH] Invites on the slack form create multi-channel guests (#23) * Invites on the slack form create multi-channel guests * Use CORS only in production * Open this boi UP * Remove cors-anywhere * Remove JSON parse * Attempt boolean logic for teens * Attempt to fix som form * Attempt to fix form routing error * Don't include post URL in form html * Remove method from HTML * Try persisting event * Remove fetch imports * Edit submitted button copy * Add logging * Fix teen field Co-authored-by: Lachlan Campbell --- .gitignore | 3 +++ components/home/join-form.js | 10 ++------ components/submit.js | 2 +- lib/use-form.js | 14 +++++----- pages/api/join.js | 1 - pages/api/som-join.js | 50 ++++++++++++++++++++++++++++++++++++ pages/api/stickers.js | 3 +-- vercel.json | 7 ++--- 8 files changed, 67 insertions(+), 23 deletions(-) create mode 100644 pages/api/som-join.js diff --git a/.gitignore b/.gitignore index c79f3933..12fa6329 100755 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ .now +.env .next node_modules .DS_Store public/home + +.vercel \ No newline at end of file diff --git a/components/home/join-form.js b/components/home/join-form.js index 27f17f9f..e2ea4250 100644 --- a/components/home/join-form.js +++ b/components/home/join-form.js @@ -3,16 +3,10 @@ import useForm from '../../lib/use-form' import Submit from '../submit' const JoinForm = ({ sx = {} }) => { - const { status, formProps, useField } = useForm('/api/join') + const { status, formProps, useField } = useForm('/api/som-join') return ( - +