Fix Newsletter form types
This commit is contained in:
@@ -30,8 +30,7 @@
|
||||
*/
|
||||
const formSubmission = async ({ target }) => {
|
||||
const formData = new FormData(target)
|
||||
const formValues = Object.fromEntries(formData)
|
||||
const { email } = formValues
|
||||
const email = String(formData.get('email'))
|
||||
|
||||
if (email && email.match('/^([\w.-])+@([\w.-])+\.([a-zA-Z])+/')) {
|
||||
const req = await fetch('/api/newsletter', {
|
||||
|
||||
Reference in New Issue
Block a user