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 && (