-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
101 lines (91 loc) · 2.86 KB
/
App.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import React, { useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { FaUserCircle } from "react-icons/fa";
const Navbar = () => {
const [isLoggedIn, setIsLoggedIn] = useState(true);
const [isLoggedOut, setIsLoggedOut] = useState(false);
const auth = localStorage.getItem("authorization");
console.log(auth);
let navbar;
let navbar2;
return (
<div>
{ auth ?
<nav className="nav-ul navbar navbar-dark bg-zinc-800 fixed w-full top-0 z-10">
<div className="container flex sm:flex-row flex-col gap-2 justify-between items-center">
<h1 className="fs-3">
<Link to='/' className="text-white ">
<span className="hover:text-blue-600">Music Essentials</span>
</Link>
</h1>
<div className="flex items-center gap-4">
<ul className="flex items-center gap-5 text-white">
<li>
<a href="/home">Home</a>
</li>
<li>
<div className="dropdown-menu">
<Link to="/music" >
Music
</Link>
<div className="menu-content">
<a className="links-hidden" href="/genre">
Pop
</a>
<a className="links-hidden" href="/Hiphop">
Hip Hop
</a>
<a className="links-hidden" href="/Rock">
Rock
</a>
<a className="links-hidden" href="/EDM">
EDM
</a>
<a className="links-hidden" href="/RandB">
R&B
</a>
<a className="links-hidden" href="/Jazz">
Jazz
</a>
</div>
</div>
</li>
<li>
<Link to="/Store">
Store
</Link>
</li>
<li>
<a href="/News">News</a>
</li>
<li>
<a href="/Contact">Contact</a>
</li>
</ul>
{/* <div></div> */}
</div>
</div>
</nav>
:
<nav className="nav-ul navbar navbar-dark bg-zinc-800 fixed w-full top-0 z-10">
<div className="container flex sm:flex-row flex-col gap-2 justify-between items-center">
<h1 className="fs-3">
<Link to='/' className="text-white ">
<span className="hover:text-blue-600">Music Essentials</span>
</Link>
</h1>
<div className="flex items-center gap-4">
<ul className="flex items-center gap-5 text-white">
<li>
<a href="/">Home</a>
</li>
</ul>
{/* <div></div> */}
</div>
</div>
</nav>
}
</div>
);
};
export default Navbar;