diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d0411a8 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +NEXT_PUBLIC_FORMSUBMIT_KEY=your-email-or-random-string diff --git a/app/components/contact-us/business-form.tsx b/app/components/contact-us/business-form.tsx index 67aced6..521817c 100644 --- a/app/components/contact-us/business-form.tsx +++ b/app/components/contact-us/business-form.tsx @@ -1,4 +1,13 @@ +"use client" +import { useState } from "react" + export default function BusinessForm() { + const [name, setName] = useState(""); + const [email, setEmail] = useState(""); + const [phoneNumber, setPhoneNumber] = useState(""); + const [category, setCategory] = useState(""); + const [message, setMessage] = useState(""); + return (
@@ -9,18 +18,18 @@ export default function BusinessForm() {
- + setName(e.target.value)} required + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"/>
- + setEmail(e.target.value)} required + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"/>
- + setPhoneNumber(e.target.value)} required + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"/>
@@ -31,8 +40,14 @@ export default function BusinessForm() {
- + setCategory(e.target.value)} required + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"/> +
+
+ +
+ +
diff --git a/app/components/contact-us/general-form.tsx b/app/components/contact-us/general-form.tsx index 4daf669..16700c9 100644 --- a/app/components/contact-us/general-form.tsx +++ b/app/components/contact-us/general-form.tsx @@ -1,31 +1,48 @@ +"use client" +import { useState } from "react" + export default function GeneralForm() { + const [name, setName] = useState(""); + const [email, setEmail] = useState(""); + const [phoneNumber, setPhoneNumber] = useState(""); + const [category, setCategory] = useState(""); + const [message, setMessage] = useState(""); + + const formSubmitKey = process.env.NEXT_PUBLIC_FORMSUBMIT_KEY; + return (

Contact Us

Feel free to reach out through the form below!

-
+
- + setName(e.target.value)} required + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 focus:outline-none"/>
- + setEmail(e.target.value)} required + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 focus:outline-none"/>
- + setPhoneNumber(e.target.value)} required + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 focus:outline-none"/>
- + setCategory(e.target.value)} required + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 focus:outline-none"/> +
+
+ +
+ +
diff --git a/app/contact-us/page.tsx b/app/contact-us/page.tsx index f3e28e5..1b7ad5b 100644 --- a/app/contact-us/page.tsx +++ b/app/contact-us/page.tsx @@ -5,21 +5,21 @@ import GeneralForm from "@/app/components/contact-us/general-form"; export default function ContactPage() { return (
-
-
+
+
-
+
{'logo'}
-
-
+
+
{'logo'}
-
+
diff --git a/package-lock.json b/package-lock.json index 53cd9ba..ea3f2a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8295,13 +8295,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true, - "license": "MIT" - }, "node_modules/swiper": { "version": "11.1.14", "resolved": "https://registry.npmjs.org/swiper/-/swiper-11.1.14.tgz", @@ -8321,6 +8314,13 @@ "node": ">= 4.7.0" } }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true, + "license": "MIT" + }, "node_modules/tailwindcss": { "version": "3.4.4", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.4.tgz",