feat: Refactor layout and add toast notifications
This commit introduces a major structural refactoring by creating a shared application layout and integrates a toast notification system. Key changes: - A new `layout.tsx` file now contains the common Header and Footer components, ensuring a consistent structure across all pages. - The main `page.tsx` has been simplified to only contain its specific content, with layout elements removed. - The `react-toastify` library has been added to provide user feedback through toast notifications. - Custom CSS styles have been applied to the toast notifications for a branded look and feel, including different gradient backgrounds for success, error, warning, and info states. - The `.gitignore` file was updated to explicitly track the `.env` file, likely for an example configuration.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"use client";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
export default function HeaderButtons() {
|
||||
const pathname = usePathname();
|
||||
return (
|
||||
<div className="flex justify-between items-center gap-5 mt-4 md:mt-0">
|
||||
<Link
|
||||
href={pathname.includes("contact-us") ? "/" : "/contact-us"}
|
||||
className="text-(--primary)">
|
||||
{pathname.includes("contact-us") ? "Home" : "Contact us"}
|
||||
</Link>
|
||||
<Link
|
||||
href={"/login"}
|
||||
className="bg-(--primary) text-white px-12 py-3 rounded-full">
|
||||
Login
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user