Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiscirmi committed Dec 9, 2023
1 parent d912b4b commit e733af1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/CheckoutForm/CheckoutForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import ReCAPTCHA from 'react-google-recaptcha'
import emailjs from '@emailjs/browser'
import styles from './CheckoutForm.module.scss'

function CheckoutForm({ handleName, handlePhone, handleEmail, handleCaptcha, sendOrder, orderId, cart, name, phone, email, verified }) {
function CheckoutForm({ handleName, handlePhone, handleEmail, handleCaptcha, sendOrder, cart, name, phone, email, verified }) {

const form = useRef()

const sendEmail = () => {
if (name && phone && phone.length === 10 && parseInt(phone) && email && email.includes('@') && cart.length > 0 && verified) {
try {
emailjs.sendForm('service_7y665pr', 'template_0zjm6ef', form.current, 'zdDI_XXmLlPkBea6o')
emailjs.sendForm('service_7y665pr', 'template_0zjm6ef', form.current, process.env.REACT_APP_EMAILJS_PUBLIC_KEY)
.then((result) => {
console.log(result.text)
}, (error) => {
Expand Down

0 comments on commit e733af1

Please sign in to comment.