source: imaps-frontend/src/pages/IMaps/components/Navbar.jsx@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.5 KB
Line 
1import React, {useContext, useState} from "react";
2import { Link } from "react-router-dom";
3import logo_icon from "../../../assets/logo_icon.png";
4//import { AuthContext } from "../../../components/AuthContext/AuthContext";
5import Logo from "../../../components/Logo/Logo.jsx";
6import Profile from "../../../components/Profile/Profile.jsx";
7import {useAppContext} from "../../../components/AppContext/AppContext.jsx";
8import "./Navbar.css";
9
10function Navbar() {
11 const [click, setClick] = useState(false);
12
13 const { isAuthenticated } = useAppContext();
14
15 return (
16 <nav className="modern-navbar">
17 <div className="navbar-container">
18 {/* Left Section - Logo and Title */}
19 <div className="navbar-left">
20 <Logo position="relative"/>
21 </div>
22
23 {/* Right Section - Login/Signup or Profile */}
24 <div className="navbar-right">
25 {isAuthenticated ? (
26 <Profile position="relative"/>
27 ) : (
28 <>
29 <Link to="/Login" className="navbar-btn navbar-login">
30 Log In
31 </Link>
32 <Link to="/Signup" className="navbar-btn navbar-signup">
33 Sign Up
34 </Link>
35 </>
36 )}
37 </div>
38 </div>
39 </nav>
40 );
41}
42
43export default Navbar;
Note: See TracBrowser for help on using the repository browser.