fix for email subscribing.

This commit is contained in:
Matija Sosic 2023-06-01 17:22:08 +02:00
parent ee84d18cb8
commit 4255d9bc5a

View File

@ -11,12 +11,10 @@ const SubscribeForm = ({ className, inputBgColor }) => {
// NOTE(matija): without this, the whole page reloads on form submission.
event.preventDefault()
console.log('going to submit an email!')
try {
const res = await fetch(createNewEmailSubscriberApiEndpoint, {
method: "POST",
body: 'userGroup=&email=' + 'matija.sosic@gmail.com',
body: 'userGroup=&email=' + email,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},