Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Forms with Email Js #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Forms with Email Js #9

wants to merge 3 commits into from

Conversation

NicolasEzequielCaba
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Apr 20, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/giancarlobrusca/preservate-website/GaMVta9WSYZVtG2zTZEQe6emCkWH
✅ Preview: https://preservate-website-git-f-nc-forms-giancarlobrusca.vercel.app

</div>
<FormContent type={type} />
</>
);
};

function FormContent({ type }) {
function onSubmit(e) {
function onSubmitCompany(e) {
console.log('submitted');
Copy link
Owner

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á 🧐


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);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otrop 🧐

location.reload();
}, (error) => {
alert('Hubo un error, volve a intentarlo.')
console.log(error.text);
Copy link
Owner

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.

});
}
function onSubmitVolunteer(e) {
console.log('submitted');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐


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);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐

alert('Su petición se envio correctamente!!')
location.reload();
}, (error) => {
console.log(error.text);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lo mismo que arriba

@vercel
Copy link

vercel bot commented Jun 9, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
preservate-website ✅ Ready (Inspect) Visit Preview Jun 9, 2022 at 1:51PM (UTC)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants