From eb5e043357abc0633166a86295540b5f0a269a1a Mon Sep 17 00:00:00 2001 From: Maulana Sodiqin Date: Sat, 29 Nov 2025 23:56:57 +0700 Subject: [PATCH] fix(users): fix team card display on user profile page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use member_count instead of members.length for member count - Use singular "Team" when user has only 1 team - Add fallback banner image - Add fallback logo placeholder - Add submission badge - Improve card layout and styling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../hackathon/src/app/users/[userId]/page.tsx | 76 ++++++++++--------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/apps/hackathon/src/app/users/[userId]/page.tsx b/apps/hackathon/src/app/users/[userId]/page.tsx index a6386e8..b49f289 100644 --- a/apps/hackathon/src/app/users/[userId]/page.tsx +++ b/apps/hackathon/src/app/users/[userId]/page.tsx @@ -124,60 +124,66 @@ const UserProfilePage: FC = (): ReactElement => { )} - {/* Teams Section */} + {/* Team Section */} {userTeams.length > 0 ? (

- Teams ({userTeams.length}) + {userTeams.length === 1 ? 'Team' : 'Teams'} ({userTeams.length})

-
+
{userTeams.map((team: any) => ( -
- {team.name} -
+ {team.name}
-
- {team.logo && ( +
+ {team.logo ? ( {team.name} + ) : ( +
+ +
)}
-

+

{team.name}

-
-

- - {team.city} -

-

- - {team.members?.length || 0} members -

+
+ {team.has_submission && ( + + + Submitted + + )} + {team.city && ( + + + {team.city} + + )} + + + {team.member_count || team.members?.length || 0} member{(team.member_count || team.members?.length || 0) !== 1 ? 's' : ''} +
-

- {team.description} -

+ {team.description && ( +

+ {team.description} +

+ )}
))} @@ -186,10 +192,12 @@ const UserProfilePage: FC = (): ReactElement => { ) : (

- Teams + Team

-
👥
+
+ +

Not in any team yet