From a1e89b882af846e9734e98486d969e9e4c1e1d17 Mon Sep 17 00:00:00 2001 From: Maulana Sodiqin Date: Sat, 29 Nov 2025 16:48:03 +0700 Subject: [PATCH] feat(teams): add warning for single-member teams MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Show warning on browse page for teams with only 1 member - Show warning on team detail page for single-member teams - Helps users understand they need 2+ members to submit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/hackathon/src/app/teams/[teamId]/page.tsx | 17 +++++++++++++++++ apps/hackathon/src/app/teams/browse/page.tsx | 8 ++++++++ 2 files changed, 25 insertions(+) diff --git a/apps/hackathon/src/app/teams/[teamId]/page.tsx b/apps/hackathon/src/app/teams/[teamId]/page.tsx index 4eb04d8..3885672 100644 --- a/apps/hackathon/src/app/teams/[teamId]/page.tsx +++ b/apps/hackathon/src/app/teams/[teamId]/page.tsx @@ -491,6 +491,23 @@ const TeamDashboardPage: FC = (): ReactElement => { )} + {/* Warning for single member teams */} + {members.length === 1 && !team.has_submission && isMember && ( +
+
+ ⚠️ +
+

+ Team Needs More Members +

+

+ Your team needs at least 2 members to submit a project. Invite someone or wait for join requests! +

+
+
+
+ )} + {/* Submission Status - Only show to members */} {team.has_submission && isMember && (
diff --git a/apps/hackathon/src/app/teams/browse/page.tsx b/apps/hackathon/src/app/teams/browse/page.tsx index 8fef126..6803a89 100644 --- a/apps/hackathon/src/app/teams/browse/page.tsx +++ b/apps/hackathon/src/app/teams/browse/page.tsx @@ -225,6 +225,14 @@ const BrowseTeamsPage: FC = (): ReactElement => {

{team.description}

+ {(team.member_count || 0) === 1 && !team.has_submission && ( +
+

+ + This team needs at least 2 members to submit +

+
+ )}
{isMyTeam(team.id) ? (