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,