From aa905c7fd564af70247abfbbf2407f25a5b1ab13 Mon Sep 17 00:00:00 2001 From: Shoaib1M Date: Fri, 9 Jan 2026 18:34:37 +0530 Subject: [PATCH] adding the contact page --- src/app/components/Navbar.jsx | 118 ++++++++++++++++++---------------- src/app/contact/page.jsx | 13 ++++ 2 files changed, 74 insertions(+), 57 deletions(-) create mode 100644 src/app/contact/page.jsx diff --git a/src/app/components/Navbar.jsx b/src/app/components/Navbar.jsx index 8dd7127..5776cf4 100644 --- a/src/app/components/Navbar.jsx +++ b/src/app/components/Navbar.jsx @@ -51,6 +51,7 @@ const DIRECT_LINKS = { Projects: "/projects", Achievements: "/achievements", Events: "/events", + Contact: "/contact", }; export default function Navbar() { @@ -140,56 +141,58 @@ export default function Navbar() { // ✅ Render desktop dropdown // ✅ Render desktop dropdown -const renderDesktopDropdown = (item) => { - const config = DROPDOWN_CONFIG[item]; - if (!config) return null; + const renderDesktopDropdown = (item) => { + const config = DROPDOWN_CONFIG[item]; + if (!config) return null; - const isActive = activeDropdown === item; + const isActive = activeDropdown === item; - return ( -
setActiveDropdown(item)} - onMouseLeave={() => setActiveDropdown(null)} - > - setActiveDropdown(item)} + onMouseLeave={() => setActiveDropdown(null)} > - {item} ▾ - + + {item} ▾ + - - {isActive && ( - - {config.items.map((dropdownItem) => ( - setIsOpen(false)} - > - {dropdownItem.label} - - ))} - - )} - -
- ); -}; + + {isActive && ( + + {config.items.map((dropdownItem) => ( + setIsOpen(false)} + > + {dropdownItem.label} + + ))} + + )} + + + ); + }; // ✅ Render regular menu item const renderMenuItem = (item, isMobile = false) => { // Check if it's a dropdown item if (DROPDOWN_CONFIG[item]) { - return isMobile ? renderMobileDropdown(item) : renderDesktopDropdown(item); + return isMobile + ? renderMobileDropdown(item) + : renderDesktopDropdown(item); } // Regular menu item @@ -213,14 +216,18 @@ const renderDesktopDropdown = (item) => { // Logo component to avoid repetition const Logo = () => (
- - - - + + +
@@ -258,10 +265,12 @@ const renderDesktopDropdown = (item) => {