feat: Refactor contact form and improve 404 page
This commit refactors the contact form for better reusability and moves it from the global footer to a dedicated section on the homepage. Additionally, it enhances the user experience on the 404 page. Key changes: - The `ContactUsForm` component is now configurable with props for grid layout (`columnsPerRow`) and button text, making it more versatile. - The contact form has been removed from the shared footer in the main layout and is now explicitly included only on the homepage. - The 404 "Not Found" page has been updated to include a direct link to the homepage for easier navigation. - Minor style adjustments were made to the 404 page layout and input field padding for improved visual consistency.
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
"use client";
|
||||
import { usePathname } from "next/navigation";
|
||||
import ContactUs from "../_contact-us/page";
|
||||
|
||||
const FooterForm = () => {
|
||||
const pathName = usePathname();
|
||||
if (pathName !== "/") return null;
|
||||
return (
|
||||
<div className="absolute w-full -top-[420px] md:-top-72 z-10">
|
||||
<ContactUs />
|
||||
|
||||
@@ -38,7 +38,7 @@ function InputGroup({
|
||||
: isFocused
|
||||
? "border-(--primary)"
|
||||
: "border-gray-200"
|
||||
} p-2 rounded-lg w-full outline-none`}
|
||||
} p-2 py-3 rounded-lg w-full outline-none`}
|
||||
id={id}
|
||||
{...rest}
|
||||
onChange={handleChange}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
"use client";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
const NavigationBar = () => {
|
||||
const pathname = usePathname();
|
||||
return (
|
||||
<nav>
|
||||
<ul className="flex flex-row-reverse items-center gap-12">
|
||||
<li className="bg-(--primary) text-white py-5 px-12 rounded-full">
|
||||
Login
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
href="/contact-us"
|
||||
className={`py-5 rounded-full ${
|
||||
pathname === "/contact-us" && "text-(--primary) font-semibold"
|
||||
}`}>
|
||||
Contact us
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
href="/"
|
||||
className={`py-5 rounded-full ${
|
||||
pathname === "/" && "text-(--primary) font-semibold"
|
||||
}`}>
|
||||
Home
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
);
|
||||
};
|
||||
|
||||
export default NavigationBar;
|
||||
Reference in New Issue
Block a user