diff --git a/src/components/GoalTracker.tsx b/src/components/GoalTracker.tsx index 8ea2165dc..d2eecbe22 100644 --- a/src/components/GoalTracker.tsx +++ b/src/components/GoalTracker.tsx @@ -243,6 +243,7 @@ export function useGoalTracker() { function getCompletionLabel(goal: Goal): string { if (goal.current >= goal.target) { + if (goal.current > goal.target) return "Goal surpassed! 🎯"; if (goal.recurrence === "weekly") return "Completed this week ✓"; if (goal.recurrence === "monthly") return "Completed this month ✓"; return "Completed ✓"; @@ -617,8 +618,10 @@ export default function GoalTracker() { Math.min(Math.round((goal.current / goal.target) * 100), 100) ) : 0; + const progressWidth = Math.min((goal.current / Math.max(goal.target, 1)) * 100, 100); const isDeleting = deletingId === goal.id; const completed = goal.current >= goal.target; + const isSurpassed = goal.current > goal.target; const completionLabel = getCompletionLabel(goal); const isAutoSynced = goal.unit === "commits" || goal.unit === "prs"; @@ -780,12 +783,16 @@ export default function GoalTracker() { -