From a02554f45f1a55cfd46eeb07e6abdd5d8aa5c08b Mon Sep 17 00:00:00 2001 From: dimasma0305 Date: Wed, 15 Jan 2025 12:17:02 +0800 Subject: [PATCH] feat: refactor Navbar component to use dynamic navigation links and button properties for improved maintainability --- src/app/_components/navbar.tsx | 54 ++++++++++++++++------------------ 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/src/app/_components/navbar.tsx b/src/app/_components/navbar.tsx index 7c35219..876ba49 100644 --- a/src/app/_components/navbar.tsx +++ b/src/app/_components/navbar.tsx @@ -11,42 +11,42 @@ import Button from './button'; const Navbar: React.FC = () => { const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); + const navLinks = [ + { href: "/", text: "Home" }, + { href: "/ctfs", text: "CTF's" }, + { href: "/repositories", text: "Repositories" }, + { href: "/indonesia-ctf-2025", text: "INDONESIA CTF 2025" }, + { href: "/mobile-ctf-2025", text: "Mobile CTF 2025" }, + ]; + + const buttonProps = { + text: 'Join Playground', + href: 'https://playground.tcp1p.team/', + }; + return (