From c00bdfcc2d06b1def0a147557bac48f83a909e2a Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 5 Oct 2025 00:09:46 +0000 Subject: [PATCH] Improve passport summary for legendary status cgen-fcd78ada4f66437f90722c0ac02da384 --- client/components/passport/PassportSummary.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/components/passport/PassportSummary.tsx b/client/components/passport/PassportSummary.tsx index 25a1cbba..d7bdd8cc 100644 --- a/client/components/passport/PassportSummary.tsx +++ b/client/components/passport/PassportSummary.tsx @@ -80,11 +80,14 @@ const PassportSummary = ({ const level = profile.level ?? 1; const totalXp = profile.total_xp ?? 0; const loyaltyPoints = (profile as any)?.loyalty_points ?? 0; - const progressToNextLevel = Math.min(((totalXp % 1000) / 1000) * 100, 100); - const featureAchievements = achievements.slice(0, MAX_HERO_ACHIEVEMENTS); const godModeUnlocked = achievements.some( (achievement) => achievement.name?.toLowerCase() === "god mode", ); + const isLegendary = godModeUnlocked || level >= 100; + const progressToNextLevel = isLegendary + ? 100 + : Math.min(((totalXp % 1000) / 1000) * 100, 100); + const featureAchievements = achievements.slice(0, MAX_HERO_ACHIEVEMENTS); return ( @@ -147,10 +150,10 @@ const PassportSummary = ({
- Progress to Level {level + 1} + {isLegendary ? "Legendary Status" : `Progress to Level ${level + 1}`} - {(progressToNextLevel || 0).toFixed(0)}% + {isLegendary ? "MAX" : `${(progressToNextLevel || 0).toFixed(0)}%`}