feat: add @ prefix to profile URLs and make usernames clickable

- Updated all profile links to use /@username format
- Made usernames clickable in chat messages
- Added URL parameter sanitization to strip @ when fetching user data
- Ensures consistent profile URL format across the application
This commit is contained in:
Radosław Gierwiało
2025-11-29 20:57:17 +01:00
parent 4e9557bd29
commit a9c46f552f
7 changed files with 23 additions and 15 deletions

View File

@@ -16,7 +16,7 @@ const MatchCard = ({ match, onAccept, onReject, onOpenChat, processing }) => {
<div className="flex items-start justify-between">
<div className="flex-1">
<div className="flex items-center gap-3 mb-2">
<Link to={`/${match.partner.username}`} className="flex-shrink-0">
<Link to={`/@${match.partner.username}`} className="flex-shrink-0">
<img
src={match.partner.avatar || `https://api.dicebear.com/7.x/avataaars/svg?seed=${match.partner.username}`}
alt={match.partner.username}
@@ -24,7 +24,7 @@ const MatchCard = ({ match, onAccept, onReject, onOpenChat, processing }) => {
/>
</Link>
<div>
<Link to={`/${match.partner.username}`}>
<Link to={`/@${match.partner.username}`}>
<h3 className="font-semibold text-gray-900 hover:text-primary-600 transition-colors">
{match.partner.firstName && match.partner.lastName
? `${match.partner.firstName} ${match.partner.lastName}`