Ignore:
Timestamp:
01/26/26 17:02:31 (6 months ago)
Author:
Filip Gavrilovski <filipgavrilovski28@…>
Branches:
main
Children:
3727852
Parents:
24a2a2a
Message:

add logo and favicon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/Nav.tsx

    r24a2a2a r4022db1  
    11import { Link } from "react-router-dom";
    22import axiosInstance from "./api/axiosInstance";
     3import Logo from "./assets/logo-finkwave.png";
    34import { useAuth } from "./context/authContext";
    45
     
    67        const { user, setUser, isAuthLoading } = useAuth();
    78
    8         const handleLogout = async () => {
     9        const handleLogout = async (e: React.MouseEvent<HTMLButtonElement>) => {
     10                e.preventDefault();
    911                try {
    1012                        await axiosInstance.post("/auth/logout");
     
    1820                <div className="bg-gray-800 p-4 flex justify-between items-center">
    1921                        <Link to="/" className="text-white text-lg font-semibold">
    20                                 Finkwave
     22                                <img src={Logo} alt="Finkwave Logo" className="h-12 w-auto" />
    2123                        </Link>
    2224
     
    4042                                                                </div>
    4143                                                                <button
    42                                                                         onClick={(e) => {
    43                                                                                 e.preventDefault();
    44                                                                                 handleLogout();
    45                                                                         }}
    46                                                                         className="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors duration-200 flex items-center space-x-1"
     44                                                                        onClick={(e: React.MouseEvent<HTMLButtonElement>) =>
     45                                                                                handleLogout(e)
     46                                                                        }
     47                                                                        className="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg text-sm
     48                                    font-medium transition-colors duration-200 flex items-center space-x-1 cursor-pointer"
    4749                                                                >
    4850                                                                        Logout
     
    5052                                                        </div>
    5153                                                ) : (
    52                                                         <div className="flex items-center space-x-2">
     54                                                        <div className="flex items-center space-x-4">
    5355                                                                <Link
    5456                                                                        to="/login"
    55                                                                         className="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors duration-200"
     57                                                                        className="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg text-sm
     58                                    font-medium transition-colors duration-200 cursor-pointer"
    5659                                                                >
    5760                                                                        Login
     61                                                                </Link>
     62                                                                <Link
     63                                                                        to="/register"
     64                                                                        className="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-lg text-sm
     65                                    font-medium transition-colors duration-200 cursor-pointer"
     66                                                                >
     67                                                                        Register
    5868                                                                </Link>
    5969                                                        </div>
Note: See TracChangeset for help on using the changeset viewer.