Changeset 615dcee for frontend/src/components/userProfile/UserListModal.tsx
- Timestamp:
- 02/18/26 22:33:00 (5 months ago)
- Branches:
- main
- Children:
- ed8f998
- Parents:
- d1ee039
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/components/userProfile/UserListModal.tsx
rd1ee039 r615dcee 3 3 import type { BaseNonAdminUser } from "../../utils/types"; 4 4 import { useEffect } from "react"; 5 import { useAuth } from "../../context/authContext"; 5 6 6 7 interface ModalProps { … … 18 19 }: ModalProps) => { 19 20 const navigate = useNavigate(); 21 const { user } = useAuth(); 20 22 useEffect(() => { 21 23 document.body.style.overflow = "hidden"; … … 72 74 </div> 73 75 </div> 74 75 <button 76 onClick={() => onFollowToggle(u.username)} 77 className={`px-4 py-1.5 text-sm font-medium rounded-full transition-colors cursor-pointer ${ 78 u.isFollowedByCurrentUser 79 ? "bg-white/10 text-white hover:bg-white/20" 80 : "bg-[#1db954] text-black hover:bg-[#1ed760]" 81 }`} 82 > 83 {u.isFollowedByCurrentUser ? "Following" : "Follow"} 84 </button> 76 {user && ( 77 <button 78 onClick={() => onFollowToggle(u.username)} 79 className={`px-4 py-1.5 text-sm font-medium rounded-full transition-colors cursor-pointer ${ 80 u.isFollowedByCurrentUser 81 ? "bg-white/10 text-white hover:bg-white/20" 82 : "bg-[#1db954] text-black hover:bg-[#1ed760]" 83 }`} 84 > 85 {u.isFollowedByCurrentUser ? "Following" : "Follow"} 86 </button> 87 )} 85 88 </div> 86 89 ))
Note:
See TracChangeset
for help on using the changeset viewer.
