Compare commits

..

4 Commits

Author SHA1 Message Date
Flatlogic Bot
dcd8d50e0d 2.0.1 2025-07-08 04:57:01 +00:00
Flatlogic Bot
44211b0189 Auto commit: 2025-07-07T05:29:43.521Z 2025-07-07 05:29:43 +00:00
Flatlogic Bot
c57b4dde12 1.1.2 2025-07-07 05:29:41 +00:00
Flatlogic Bot
9edfaf5e11 1.0.1 2025-07-07 05:06:15 +00:00
6 changed files with 49 additions and 7 deletions

5
.gitignore vendored
View File

@ -1,3 +1,8 @@
node_modules/ node_modules/
*/node_modules/ */node_modules/
*/build/ */build/
**/node_modules/
**/build/
.DS_Store
.env

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{}

View File

@ -9,6 +9,8 @@ import FormWithImage from './designs/FormWithImage';
import { ToastContainer, toast } from 'react-toastify'; import { ToastContainer, toast } from 'react-toastify';
import axios from 'axios'; import axios from 'axios';
import 'react-toastify/dist/ReactToastify.css'; import 'react-toastify/dist/ReactToastify.css';
import { emailJsServiceId, emailJsTemplateId, emailJsUserId, emailJsPublicKey } from '../../../config';
export default function ContactFormSection({ export default function ContactFormSection({
projectName, projectName,
@ -44,9 +46,25 @@ export default function ContactFormSection({
const handleSubmit = async (values, { setSubmitting, resetForm }) => { const handleSubmit = async (values, { setSubmitting, resetForm }) => {
try { try {
await axios.post('/contact-form/send', values); const formData = new FormData();
toast.success('Your message has been sent successfully!'); formData.append('service_id', emailJsServiceId);
resetForm(); formData.append('template_id', emailJsTemplateId);
formData.append('user_id', emailJsUserId);
formData.append('public_key', emailJsPublicKey);
Object.entries(values).forEach(([key, val]) => {
formData.append(key, val as any);
});
const response = await fetch('https://api.emailjs.com/api/v1.0/email/send-form', {
method: 'POST',
body: formData,
});
if (response.ok) {
toast.success('Your message has been sent successfully!');
resetForm();
} else {
toast.error('There was an error sending your message');
}
} catch (error) { } catch (error) {
toast.error('There was an error sending your message'); toast.error('There was an error sending your message');
} finally { } finally {

View File

@ -20,3 +20,10 @@ export const getPageTitle = (currentPageTitle: string) =>
`${currentPageTitle}${appTitle}`; `${currentPageTitle}${appTitle}`;
export const tinyKey = process.env.NEXT_PUBLIC_TINY_KEY || ''; export const tinyKey = process.env.NEXT_PUBLIC_TINY_KEY || '';
export const emailJsServiceId = process.env.NEXT_PUBLIC_EMAILJS_SERVICE_ID || '';
export const emailJsTemplateId = process.env.NEXT_PUBLIC_EMAILJS_TEMPLATE_ID || '';
export const emailJsUserId = process.env.NEXT_PUBLIC_EMAILJS_USER_ID || '';
export const emailJsPublicKey = process.env.NEXT_PUBLIC_EMAILJS_PUBLIC_KEY || '';

View File

@ -66,6 +66,15 @@ export default function WebSite() {
mainText={`Reach Out to ${projectName} `} mainText={`Reach Out to ${projectName} `}
subTitle={`Feel free to contact us anytime. ${projectName} is committed to providing timely responses to all your inquiries.`} subTitle={`Feel free to contact us anytime. ${projectName} is committed to providing timely responses to all your inquiries.`}
/> />
<section className="bg-white py-8">
<div className="container mx-auto px-4 text-center">
<h2 className="text-2xl font-bold mb-4">Contact Details</h2>
<p className="mb-2">Address: Lado Sarai, Saket, New Delhi, 110030</p>
<p className="mb-2">Phone: 9041253266</p>
<p className="mb-2">Email: <a href="mailto:rishabh200602per@gmail.com" className="text-blue-500 hover:underline">rishabh200602per@gmail.com</a></p>
</div>
</section>
</main> </main>
<WebSiteFooter projectName={'Zynorix Solutions'} /> <WebSiteFooter projectName={'Zynorix Solutions'} />
</div> </div>