Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-24 13:58:17 +00:00
co-authored by renee-png
parent 37587e4e10
commit 6bbef9c50c
+3 -3
View File
@@ -167,7 +167,7 @@ function TasksPage() {
groups["No due date"].push(t);
continue;
}
const d = startOfDay(new Date(t.due_date));
const d = startOfDay(parseDateOnly(t.due_date)!);
if (isBefore(d, today)) groups.Overdue.push(t);
else if (isSameDay(d, today)) groups.Today.push(t);
else if (isSameDay(d, tomorrow)) groups.Tomorrow.push(t);
@@ -298,7 +298,7 @@ function TasksPage() {
.map((p) => p.full_name || p.email);
let countdown: { label: string; tone: string } | null = null;
if (t.due_date && t.status !== "complete") {
const days = differenceInCalendarDays(startOfDay(new Date(t.due_date)), startOfDay(new Date()));
const days = differenceInCalendarDays(startOfDay(parseDateOnly(t.due_date)!), startOfDay(new Date()));
if (days < 0)
countdown = {
label: `${Math.abs(days)}d overdue`,
@@ -343,7 +343,7 @@ function TasksPage() {
<div className="text-xs text-right shrink-0">
<div className="text-muted-foreground flex items-center gap-1 justify-end">
<CalIcon className="h-3 w-3" />
{format(new Date(t.due_date), "MMM d, yyyy")}
{format(parseDateOnly(t.due_date)!, "MMM d, yyyy")}
</div>
{countdown && (
<div className={cn("text-[11px] font-medium", countdown.tone)}>