diff --git a/src/components/dashboard/activity-calendar.tsx b/src/components/dashboard/activity-calendar.tsx index 0e06259..059e1de 100644 --- a/src/components/dashboard/activity-calendar.tsx +++ b/src/components/dashboard/activity-calendar.tsx @@ -93,6 +93,12 @@ export function ActivityCalendar({ {grid.weeks.map((week, weekIndex) => week.map((day, dayIndex) => { if (!day.inRange) return null; + // Single template-literal child: React 19's HTML serializer drops + // mixed text/expression children inside elements when + // emitted as SSR markup, causing a hydration mismatch where the + // client re-adds the text. One pre-formatted string keeps the + // server and client output identical. + const tooltipText = `${day.date}: ${day.count} ${day.count === 1 ? "commit" : "commits"}`; return ( <rect key={day.date} @@ -103,10 +109,7 @@ export function ActivityCalendar({ rx={2} fill={fill(day.level)} > - <title> - {day.date}: {day.count}{" "} - {day.count === 1 ? "commit" : "commits"} - + {tooltipText} ); })