being a wee bit toxic
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user