-
Notifications
You must be signed in to change notification settings - Fork 1
Forms with Email Js #9
base: master
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/giancarlobrusca/preservate-website/GaMVta9WSYZVtG2zTZEQe6emCkWH |
src/components/Form/index.js
Outdated
</div> | ||
<FormContent type={type} /> | ||
</> | ||
); | ||
}; | ||
|
||
function FormContent({ type }) { | ||
function onSubmit(e) { | ||
function onSubmitCompany(e) { | ||
console.log('submitted'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Te olvidaste un console.log
acá 🧐
src/components/Form/index.js
Outdated
|
||
emailjs.sendForm(process.env.NEXT_PUBLIC_SERVICE_ID, process.env.NEXT_PUBLIC_COMPANY_TEMPLATE_ID, e.target, process.env.NEXT_PUBLIC_USER_ID) | ||
.then((result) => { | ||
console.log(result.text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otrop 🧐
src/components/Form/index.js
Outdated
location.reload(); | ||
}, (error) => { | ||
alert('Hubo un error, volve a intentarlo.') | ||
console.log(error.text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. No está mal consolear errores, pero mejor que el log
es usar el console.error
en estos casos.
src/components/Form/index.js
Outdated
}); | ||
} | ||
function onSubmitVolunteer(e) { | ||
console.log('submitted'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧐
src/components/Form/index.js
Outdated
|
||
emailjs.sendForm(process.env.NEXT_PUBLIC_SERVICE_ID, process.env.NEXT_PUBLIC_VOLUNTEER_TEMPLATE_ID, e.target, process.env.NEXT_PUBLIC_USER_ID) | ||
.then((result) => { | ||
console.log(result.text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧐
src/components/Form/index.js
Outdated
alert('Su petición se envio correctamente!!') | ||
location.reload(); | ||
}, (error) => { | ||
console.log(error.text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lo mismo que arriba
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
No description provided.