From c9f5b9e4a5125ae6b47163c4ccf169cce3d54960 Mon Sep 17 00:00:00 2001 From: Maulana Sodiqin Date: Wed, 26 Nov 2025 14:27:13 +0700 Subject: [PATCH] fix(hackathon): hide team chat and actions from non-members MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add isMember check to only show Quick Actions to team members - Hide submission status from non-members - Non-members can only view team info, leader, and member list 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/hackathon/src/app/teams/[teamId]/page.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/hackathon/src/app/teams/[teamId]/page.tsx b/apps/hackathon/src/app/teams/[teamId]/page.tsx index 6da71a1..4383796 100644 --- a/apps/hackathon/src/app/teams/[teamId]/page.tsx +++ b/apps/hackathon/src/app/teams/[teamId]/page.tsx @@ -27,6 +27,7 @@ const TeamDashboardPage: FC = (): ReactElement => { const currentUserId = session?.user?.id; const isLeader = currentUserId === team?.leader_id; + const isMember = members.some((member: any) => member.user_id === currentUserId); const canInvite = isLeader && members.length < MAX_TEAM_MEMBERS; console.log('Leader check:', { currentUserId, leaderId: team?.leader_id, isLeader }); @@ -182,8 +183,8 @@ const TeamDashboardPage: FC = (): ReactElement => { )} - {/* Quick Actions for Members */} - {!isLeader && ( + {/* Quick Actions for Members (non-leaders) */} + {!isLeader && isMember && (

Quick Actions

@@ -203,8 +204,8 @@ const TeamDashboardPage: FC = (): ReactElement => {
)} - {/* Submission Status */} - {team.has_submission && ( + {/* Submission Status - Only show to members */} + {team.has_submission && isMember && (
✅