-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNavbar.tsx
52 lines (49 loc) · 1.58 KB
/
Navbar.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import Image from 'next/image';
import Link from 'next/link';
import { useEffect, useState } from 'react';
import Hamburger from './Hamburger';
const Navbar = () => {
const [path, setPath] = useState<string>('');
useEffect(() => {
const item: string | undefined = window.location.href.split('/').pop();
if (item == '' || item == undefined) setPath('HOME');
else setPath(item.toUpperCase());
}, []);
return (
<nav className="flex justify-between items-center relative z-10">
<Link href="/">
<Image
src="/assets/csesoc_logo.svg"
alt="CSESoc Logo"
width={200}
height={200}
draggable={false}
/>
<p className="mt-3 text-xs">C:\INTERNAL STRUCTURE\{path}</p>
</Link>
<div>
<div className="md:flex xl:gap-18 lg:gap-10 md:gap-5 text-right font-bold hidden">
<Link href="/about">
<div className="text-xl">{'//'} about us</div>
</Link>
<Link href="/events">
<div className="text-xl">{'//'} events</div>
</Link>
<Link href="/resources">
<div className="text-xl">{'//'} resources</div>
</Link>
<Link href="/sponsors">
<div className="text-xl">{'//'} sponsors</div>
</Link>
<Link href="/contact-us">
<div className="text-xl">{'//'} contact us</div>
</Link>
</div>
<div className="md:hidden xl:hidden lg:hidden text-right font-bold block">
<Hamburger />
</div>
</div>
</nav>
);
};
export default Navbar;