Changeset 484dc3f for frontend/src/Nav.tsx
- Timestamp:
- 01/26/26 19:03:37 (6 months ago)
- Branches:
- main
- Children:
- d47e225
- Parents:
- 3727852
- File:
-
- 1 edited
-
frontend/src/Nav.tsx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Nav.tsx
r3727852 r484dc3f 1 1 import { Link } from "react-router-dom"; 2 import axiosInstance from "./api/axiosInstance";2 import axiosInstance, { baseURL } from "./api/axiosInstance"; 3 3 import Logo from "./assets/logo-finkwave.png"; 4 4 import { useAuth } from "./context/authContext"; … … 29 29 <div className="flex items-center space-x-3"> 30 30 <div className="flex items-center space-x-2 bg-slate-700 rounded-lg px-3 py-2"> 31 <div className="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center"> 32 <span className="text-white text-sm font-semibold"> 33 {user.username.charAt(0).toUpperCase()} 34 </span> 35 </div> 31 {user.profilePhoto ? ( 32 <img 33 src={`${baseURL}/${user.profilePhoto}`} 34 alt={`${user.username}'s profile`} 35 className="w-8 h-8 rounded-full object-cover" 36 /> 37 ) : ( 38 <div className="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center"> 39 <span className="text-white text-sm font-semibold"> 40 {user.username.charAt(0).toUpperCase()} 41 </span> 42 </div> 43 )} 44 36 45 <div className="text-white"> 37 46 <p className="text-sm font-medium">{user.username}</p> … … 42 51 </div> 43 52 <button 44 onClick={(e: React.MouseEvent<HTMLButtonElement>) => 45 handleLogout(e) 46 } 53 onClick={handleLogout} 47 54 className="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg text-sm 48 55 font-medium transition-colors duration-200 flex items-center space-x-1 cursor-pointer"
Note:
See TracChangeset
for help on using the changeset viewer.
