highlight due date
All checks were successful
CI / lint (push) Successful in 14s
CI / build (push) Successful in 17s
CI / build-and-push-docker (push) Successful in 31s

This commit is contained in:
2025-08-28 22:23:16 +02:00
parent d37dbc4f62
commit a4fe525b9e
2 changed files with 10 additions and 4 deletions

View File

@@ -35,9 +35,11 @@ export default function Flatastic() {
className = "irregular"; className = "irregular";
} else { } else {
className = chore.timeLeftNext <= 0 ? "due" : "notDue"; className = chore.timeLeftNext <= 0 ? "due" : "notDue";
timeLeftInDays = Math.abs( timeLeftInDays = <span className={style.timeLeft}>
{Math.abs(
Math.floor(chore.timeLeftNext / (60 * 60 * 24)), Math.floor(chore.timeLeftNext / (60 * 60 * 24)),
); )}d
</span>;
} }
return ( return (

View File

@@ -30,5 +30,9 @@
} }
.notDue { .notDue {
background-color: #ccffcc; background-color: #a6cfa6;
}
.timeLeft {
font-weight: bold;
} }