From adc902f7c7a6a155e1e40b7586ee773837ff1f9e Mon Sep 17 00:00:00 2001 From: logonoff Date: Sun, 3 Nov 2024 15:57:57 -0500 Subject: [PATCH] update env --- src/components/Contact.jsx | 2 +- vite.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Contact.jsx b/src/components/Contact.jsx index 17ae0f7..fd202c8 100644 --- a/src/components/Contact.jsx +++ b/src/components/Contact.jsx @@ -23,7 +23,7 @@ const Contact = () => { const handleSubmit = (e) => { e.preventDefault(); - emailjs.sendForm(process.env.REACT_APP_EMAILJS_SERVICE_ID, process.env.REACT_APP_EMAILJS_TEMPLATE_ID, e.target, process.env.REACT_APP_EMAILJS_PUBLIC_KEY) + emailjs.sendForm(import.meta.env.REACT_APP_EMAILJS_SERVICE_ID, import.meta.env.REACT_APP_EMAILJS_TEMPLATE_ID, e.target, import.meta.env.REACT_APP_EMAILJS_PUBLIC_KEY) .then((result) => { alert("Thanks for contacting us! We'll be in touch within 1-2 business days."); }, (error) => { diff --git a/vite.config.js b/vite.config.js index a9a80fc..b2cbec4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,5 +6,6 @@ export default defineConfig({ preview: { port: 3000 }, + envPrefix: 'REACT_APP_', plugins: [react()], })