diff --git a/index.html b/index.html
index 6cfcdb0..37a4fd4 100644
--- a/index.html
+++ b/index.html
@@ -13,7 +13,7 @@
>
-
-
- {isNavbarCollapsed ? (
+
+
+
+
+
- ) : (
-
-
-
- )}
+
-
+
{navigation.map((item, idx) => {
return (
-
setState(false)}
>
{item.title}
diff --git a/src/Components/Pages/Contact/ContactForm.tsx b/src/Components/Pages/Contact/ContactForm.tsx
index 9d7ed25..c4007b3 100644
--- a/src/Components/Pages/Contact/ContactForm.tsx
+++ b/src/Components/Pages/Contact/ContactForm.tsx
@@ -1,18 +1,67 @@
+import React from "react";
+import emailjs from "@emailjs/browser";
+import { ToastContainer, toast } from "react-toastify";
+import "react-toastify/dist/ReactToastify.css";
+
const ContactForm = () => {
+ const notify = () => {
+ toast.success("Message Sent Successfully!");
+ };
+
+ const errorToast = () => {
+ toast.error("Error Sending Message!");
+ };
+
+ const emptyForm = () => {
+ toast.warning("Please fill all the fields!");
+ };
+
+ const sendEmail = (e: React.FormEvent) => {
+ e.preventDefault();
+
+ let isEmpty = Array.from(e.currentTarget.elements).some(
+ (input) =>
+ (input as HTMLInputElement).type !== "submit" &&
+ (input as HTMLInputElement).value.trim() === ""
+ );
+
+ if (isEmpty) {
+ emptyForm();
+ return;
+ }
+
+ emailjs
+ .sendForm("service_42i3ig6", "template_f30zlog", e.currentTarget, {
+ publicKey: "vcSOwPedqkRH3nmr9",
+ })
+ .then(
+ (result) => {
+ console.log(result.text);
+ notify();
+ },
+ (error) => {
+ console.log(error.text);
+ errorToast();
+ }
+ );
+
+ e.currentTarget.reset();
+ };
+
return (
@@ -34,26 +83,39 @@ const ContactForm = () => {
+
+
);
diff --git a/src/index.css b/src/index.css
index aa5c56a..86242b3 100644
--- a/src/index.css
+++ b/src/index.css
@@ -23,3 +23,5 @@ body {
.form-input {
@apply rounded-xl px-4 py-2 mt-2 bg-gray-bg border-solid border border-gray-300 text-sm md:text-lg;
}
+
+
diff --git a/src/routes/Home.tsx b/src/routes/Home.tsx
index 8961d36..2ad367a 100644
--- a/src/routes/Home.tsx
+++ b/src/routes/Home.tsx
@@ -1,8 +1,9 @@
-import Navbar from "../Components/Pages/Navbar/Navbar";
+import Navbar from "../Components/Navbar/Navbar";
import Hero from "../Components/Pages/Hero/Hero";
import Services from "../Components/Pages/Services/Services";
import ResultsPage from "../Components/Pages/Results/ResultsPage";
import ContactPage from "../Components/Pages/Contact/ContactPage";
+import Footer from "../Components/Footer/Footer";
const Home = () => {
return (
@@ -18,6 +19,7 @@ const Home = () => {
+
);
};