From 0bf7c435db5ec29aab32834d91b1201ffc0440dc Mon Sep 17 00:00:00 2001 From: Alma Date: Sat, 12 Apr 2025 21:12:58 +0200 Subject: [PATCH] working leantime widget 97 --- components/flow.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/flow.tsx b/components/flow.tsx index faf341f0..498a23b6 100644 --- a/components/flow.tsx +++ b/components/flow.tsx @@ -140,7 +140,7 @@ export function Flow() { validDate: getValidDate(task) })) .sort((a: TaskWithDate, b: TaskWithDate) => { - // If both tasks have dates, sort by date + // If both tasks have dates, sort by date (oldest first) if (a.validDate && b.validDate) { return a.validDate.getTime() - b.validDate.getTime(); } @@ -149,8 +149,7 @@ export function Flow() { if (b.validDate) return 1; // If neither has a date, sort by ID return a.id - b.id; - }) - .slice(0, 6); + }); console.log('Final sorted tasks:', sortedTasks.map((t: TaskWithDate) => ({ id: t.id,