From 3c91be07cf35629f57c30a69491b4bbc2aa6c7b5 Mon Sep 17 00:00:00 2001 From: Greg V Date: Mon, 30 Mar 2026 11:59:56 -0700 Subject: [PATCH] Add achievement explainability and mentor boost section to leaderboard - Show achievement description as caption under each value for context - Add RocketLaunch icon and "Teams Ready for a Boost" section for mentor visibility - Add mentorOpportunities state and API consumption - Boost cards use warning-colored left border and encouraging framing Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Hackathon/HackathonLeaderboard.js | 139 +++++++++++++++--- 1 file changed, 120 insertions(+), 19 deletions(-) diff --git a/src/components/Hackathon/HackathonLeaderboard.js b/src/components/Hackathon/HackathonLeaderboard.js index 9625877..7c7d6ba 100644 --- a/src/components/Hackathon/HackathonLeaderboard.js +++ b/src/components/Hackathon/HackathonLeaderboard.js @@ -22,6 +22,7 @@ import WeekendIcon from '@mui/icons-material/Weekend'; import ExploreIcon from '@mui/icons-material/Explore'; import StarIcon from '@mui/icons-material/Star'; import CommitIcon from '@mui/icons-material/CommitRounded'; +import RocketLaunchIcon from '@mui/icons-material/RocketLaunch'; const LeaderboardContainer = styled(Paper)(({ theme }) => ({ padding: theme.spacing(3), @@ -172,7 +173,8 @@ const getIconComponent = (iconName, props = {}) => { trophy: , explore: , launch: , - link: + link: , + rocket_launch: }; if (iconMap[iconName]) { @@ -218,6 +220,7 @@ const HackathonLeaderboard = ({ const [generalStats, setGeneralStats] = useState(initialGeneralStats || []); const [individualAchievements, setIndividualAchievements] = useState(initialIndividualAchievements || []); const [teamAchievements, setTeamAchievements] = useState(initialTeamAchievements || []); + const [mentorOpportunities, setMentorOpportunities] = useState([]); const [orgName, setOrgName] = useState(githubOrg || ''); const [hackathonName, setHackathonName] = useState(eventName || ''); const [loading, setLoading] = useState(!initialGeneralStats); @@ -262,6 +265,7 @@ const HackathonLeaderboard = ({ setGeneralStats(data.generalStats || []); setIndividualAchievements(data.individualAchievements || []); setTeamAchievements(data.teamAchievements || []); + setMentorOpportunities(data.mentorOpportunities || []); setOrgName(data.githubOrg || ''); setHackathonName(data.eventName || ''); @@ -737,27 +741,37 @@ const HackathonLeaderboard = ({ - - {achievement.value} + {achievement.description && ( + + {achievement.description} + + )} ); })} - + {(!individualAchievements || individualAchievements.length === 0) && ( @@ -858,21 +872,31 @@ const HackathonLeaderboard = ({ - - {achievement.value} + {achievement.description && ( + + {achievement.description} + + )} @@ -887,6 +911,83 @@ const HackathonLeaderboard = ({ )} + {mentorOpportunities && mentorOpportunities.length > 0 && ( + + + + Teams Ready for a Boost + + + These teams could benefit from some mentor support to help them get rolling! + + + {mentorOpportunities.map((opportunity, index) => { + const hasTeamPage = opportunity.teamPage; + + return ( + + + + + {renderIcon(opportunity.icon || 'rocket_launch', { color: "inherit" })} + + + + + + {opportunity.team} + + + {opportunity.value} • {opportunity.members} members + + + + + ); + })} + + + )}