being a wee bit toxic
CI / build (push) Failing after 8s
CI / lint (push) Has been skipped
CI / create-and-publish-docker-image (push) Has been skipped

This commit is contained in:
2026-05-25 16:26:32 +02:00
parent af3277e5c7
commit ccc4de81b6
+10 -1
View File
@@ -12,9 +12,18 @@ function choreItem(chore: FlatasticChore, idToNameMap: Record<number, string>) {
className = "irregular";
} else {
className = chore.timeLeftNext <= 0 ? "due" : "notDue";
const timeInDays = Math.abs(chore.timeLeftNext) / (60 * 60 * 24) + 1;
console.log(chore.title, timeInDays);
const grubers = Math.floor(timeInDays / 100);
const days = Math.floor(timeInDays % 100);
timeLeftInDays = (
<span className={style.timeLeft}>
{Math.abs(Math.floor(chore.timeLeftNext / (60 * 60 * 24)))}d
{grubers > 0 && `${grubers} gruber${grubers > 1 ? "s" : ""} `}
{days > 0 && `${days} d`}
</span>
);
}