From fe4e9291fa14dbaf0a81d1ca66b4ede27758151a Mon Sep 17 00:00:00 2001 From: Maulana Sodiqin Date: Sun, 30 Nov 2025 00:33:26 +0700 Subject: [PATCH] fix(users): unwrap nested team data from API response MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit API returns {team: {...}} wrapped objects, need to access item.team 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../hackathon/src/app/users/[userId]/page.tsx | 107 +++++++++--------- 1 file changed, 55 insertions(+), 52 deletions(-) diff --git a/apps/hackathon/src/app/users/[userId]/page.tsx b/apps/hackathon/src/app/users/[userId]/page.tsx index 04479e1..f8acb66 100644 --- a/apps/hackathon/src/app/users/[userId]/page.tsx +++ b/apps/hackathon/src/app/users/[userId]/page.tsx @@ -131,62 +131,65 @@ const UserProfilePage: FC = (): ReactElement => { Team
- {userTeams.map((team: any) => ( - - {team.name} -
-
- {team.logo ? ( - {team.name} - ) : ( -
- -
- )} -
-

- {team.name} -

-
- {team.has_submission && ( - - - Submitted + {userTeams.map((item: any) => { + const team = item.team || item; + return ( + + {team.name} +
+
+ {team.logo ? ( + {team.name} + ) : ( +
+ +
+ )} +
+

+ {team.name} +

+
+ {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.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 && ( -

- {team.description} -

- )} -
- - ))} + + ); + })}
) : (