fixed/removed the unused cells in the heatmap that made it look weird
This commit is contained in:
parent
1208552850
commit
2b13c14e91
2 changed files with 1 additions and 8 deletions
|
|
@ -82,9 +82,6 @@ export default function ContributionHeatmap() {
|
|||
}
|
||||
}
|
||||
if (currentWeek.length > 0) {
|
||||
while (currentWeek.length < 7) {
|
||||
currentWeek.push({ date: "", contribs: -1, level: -1 });
|
||||
}
|
||||
newWeeks.push(currentWeek);
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +137,7 @@ export default function ContributionHeatmap() {
|
|||
{week.map((day, dIdx) => (
|
||||
<div
|
||||
key={dIdx}
|
||||
className={day.level === -1 ? "heatmap-cell heatmap-cell-empty" : "heatmap-cell"}
|
||||
className="heatmap-cell"
|
||||
data-level={day.level >= 0 ? day.level : undefined}
|
||||
title={day.level >= 0 ? `${day.contribs} contributions on ${day.date}` : undefined}
|
||||
onMouseEnter={() => day.level >= 0 && setHoveredCell({ date: day.date, contribs: day.contribs })}
|
||||
|
|
|
|||
|
|
@ -1166,10 +1166,6 @@ body {
|
|||
box-shadow: 0 0 6px var(--color-white);
|
||||
}
|
||||
|
||||
.heatmap-cell-empty {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.heatmap-cell[data-level="1"] { background-color: rgba(130,180,19, 0.4); }
|
||||
.heatmap-cell[data-level="2"] { background-color: rgba(130,180,19, 0.6); }
|
||||
.heatmap-cell[data-level="3"] { background-color: rgba(130,180,19, 0.8); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue