source: imaps-frontend/src/pages/IMaps/components/Navbar.jsx@ 0c6b92a

main
Last change on this file since 0c6b92a was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[0c6b92a]1import React, {useContext, useState} from "react";
[d565449]2import { Link } from "react-router-dom";
[0c6b92a]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";
[d565449]9
10function Navbar() {
11 const [click, setClick] = useState(false);
12 const [button, setButton] = useState(true);
13
14 const handleClick = () => setClick(!click);
15 const closeMobileMenu = () => setClick(false);
16
[0c6b92a]17 const { isAuthenticated } = useAppContext();
[d565449]18
[0c6b92a]19 return (
20 <nav className="modern-navbar">
21 <div className="navbar-container">
22 {/* Left Section - Logo and Title */}
23 <div className="navbar-left">
24 <Logo position="relative"/>
25 <h1 className="navbar-title">iMaps</h1>
26 </div>
[d565449]27
[0c6b92a]28 {/* Right Section - Login/Signup or Profile */}
29 <div className="navbar-right">
30 {isAuthenticated ? (
31 <Profile position="relative"/>
32 ) : (
33 <>
34 <Link to="/Login" className="navbar-btn navbar-login">
35 Log In
36 </Link>
37 <Link to="/Signup" className="navbar-btn navbar-signup">
38 Sign Up
39 </Link>
40 </>
41 )}
42 </div>
43 </div>
44 </nav>
45 );
[d565449]46}
47
48export default Navbar;
Note: See TracBrowser for help on using the repository browser.