@@ -11,42 +11,42 @@ import Button from './button';
11
11
const Navbar : React . FC = ( ) => {
12
12
const [ isMobileMenuOpen , setIsMobileMenuOpen ] = useState ( false ) ;
13
13
14
+ const navLinks = [
15
+ { href : "/" , text : "Home" } ,
16
+ { href : "/ctfs" , text : "CTF's" } ,
17
+ { href : "/repositories" , text : "Repositories" } ,
18
+ { href : "/indonesia-ctf-2025" , text : "INDONESIA CTF 2025" } ,
19
+ { href : "/mobile-ctf-2025" , text : "Mobile CTF 2025" } ,
20
+ ] ;
21
+
22
+ const buttonProps = {
23
+ text : 'Join Playground' ,
24
+ href : 'https://playground.tcp1p.team/' ,
25
+ } ;
26
+
14
27
return (
15
28
< nav className = "fixed top-0 left-0 right-0 bg-gray-900/80 backdrop-blur-lg border-b border-red-500/10 z-50" >
16
29
< div className = "max-w-7xl mx-auto" >
17
30
< div className = "flex items-center justify-between h-16 px-4 sm:px-6 lg:px-8" >
18
31
< div className = "flex-shrink-0" >
19
32
< div className = "flex items-center space-x-2" >
20
- < Image src = { logo } alt = { "TCP1P Logo" } width = { 120 } > </ Image >
33
+ < Image src = { logo } alt = { "TCP1P Logo" } width = { 120 } > </ Image >
21
34
</ div >
22
35
</ div >
23
36
24
37
< div className = "hidden md:flex items-center justify-center space-x-8" >
25
- < Link href = "/" className = "nav-item text-gray-300 hover:text-red-400 transition-colors duration-300" >
26
- Home
27
- </ Link >
28
- < Link href = "/ctfs" className = "nav-item text-gray-300 hover:text-red-400 transition-colors duration-300" >
29
- CTF's
30
- </ Link >
31
- < Link href = "/repositories" className = "nav-item text-gray-300 hover:text-red-400 transition-colors duration-300" >
32
- Repositories
33
- </ Link >
34
- < Link href = "/indonesia-ctf-2025" className = "nav-item text-gray-300 hover:text-red-400 transition-colors duration-300" >
35
- INDONESIA CTF 2025
36
- </ Link >
37
- < Link href = "/mobile-ctf-2025" className = "nav-item text-gray-300 hover:text-red-400 transition-colors duration-300" >
38
- Mobile CTF 2025
39
- </ Link >
38
+ { navLinks . map ( ( link , index ) => (
39
+ < Link key = { index } href = { link . href } className = "nav-item text-gray-300 hover:text-red-400 transition-colors duration-300" >
40
+ { link . text }
41
+ </ Link >
42
+ ) ) }
40
43
</ div >
41
44
42
45
< div className = "hidden md:block" >
43
- < Button text = 'Join Playground' href = 'https://playground.tcp1p.team/' target = '_blank' > </ Button >
46
+ < Button text = { buttonProps . text } href = { buttonProps . href } target = '_blank' > </ Button >
44
47
</ div >
45
48
46
49
< div className = "md:hidden flex items-center space-x-4" >
47
- { /* <button className="px-4 py-1.5 bg-gradient-to-r from-red-600 to-red-500 text-white text-sm rounded-full font-medium hover:from-red-500 hover:to-red-400 transition-all duration-300 shadow-lg shadow-red-500/30">
48
- Get Started
49
- </button> */ }
50
50
< button
51
51
onClick = { ( ) => setIsMobileMenuOpen ( ! isMobileMenuOpen ) }
52
52
className = "mobile-menu-button p-2 rounded-md text-red-300 hover:bg-red-900/30"
@@ -57,15 +57,11 @@ const Navbar: React.FC = () => {
57
57
</ div >
58
58
59
59
< div className = { `mobile-menu md:hidden px-4 pb-4 ${ isMobileMenuOpen ? '' : 'hidden' } ` } >
60
- < Link href = "/" className = "block px-4 py-2 text-gray-300 hover:text-red-400 transition-colors duration-300" >
61
- Home
62
- </ Link >
63
- < Link href = "/ctfs" className = "block px-4 py-2 text-gray-300 hover:text-red-400 transition-colors duration-300" >
64
- CTF's
65
- </ Link >
66
- < Link href = "/repositories" className = "block px-4 py-2 text-gray-300 hover:text-red-400 transition-colors duration-300" >
67
- Repositories
68
- </ Link >
60
+ { navLinks . map ( ( link , index ) => (
61
+ < Link key = { index } href = { link . href } className = "block px-4 py-2 text-gray-300 hover:text-red-400 transition-colors duration-300" >
62
+ { link . text }
63
+ </ Link >
64
+ ) ) }
69
65
</ div >
70
66
</ div >
71
67
</ nav >
0 commit comments