Skip to content

Commit

Permalink
Merge pull request #5 from ryan-j-parker/update
Browse files Browse the repository at this point in the history
reconnect contact form
  • Loading branch information
ryan-j-parker committed Jun 20, 2023
2 parents 791b9c7 + f86fe52 commit f649485
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/components/Main/ContactForm.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import React, { Suspense, useEffect, useState, useRef } from 'react';
import './ContactForm.css';
import emailjs from '@emailjs/browser';
Expand All @@ -13,15 +14,15 @@ export default function ContactForm() {

const handleSubmit = (event) => {
event.preventDefault();
// console.log('Form data:', { name, email, message });
// emailjs.sendForm('service_i70vkk5', 'template_0z30u1o', event.target, 'xKFk6ZSEiYrwgvG7V').then(
// (result) => {
// console.log(result.text);
// },
// (error) => {
// console.log(error.text);
// }
// );
console.log('Form data:', { name, email, message });
emailjs.sendForm('service_i70vkk5', 'template_0z30u1o', event.target, 'xKFk6ZSEiYrwgvG7V').then(
(result) => {
console.log(result.text);
},
(error) => {
console.log(error.text);
}
);
setName('');
setEmail('');
setMessage('');
Expand Down

0 comments on commit f649485

Please sign in to comment.