introduced a border around the heatmap and gridded it in a way that its always a rectangle and theres no rogue heatmap cells

This commit is contained in:
dvorakmortonxd 2026-05-20 11:34:26 +02:00
commit 94de64150d
2 changed files with 7 additions and 2 deletions

View file

@ -140,9 +140,8 @@ export default function ContributionHeatmap() {
{week.map((day, dIdx) => (
<div
key={dIdx}
className="heatmap-cell"
className={day.level === -1 ? "heatmap-cell heatmap-cell-empty" : "heatmap-cell"}
data-level={day.level >= 0 ? day.level : undefined}
style={{ visibility: day.level === -1 ? "hidden" : "visible" }}
title={day.level >= 0 ? `${day.contribs} contributions on ${day.date}` : undefined}
onMouseEnter={() => day.level >= 0 && setHoveredCell({ date: day.date, contribs: day.contribs })}
onMouseLeave={() => setHoveredCell(null)}