Zeit-heute-Liste aufsteigend sortieren (Vormittag → Abend)
Blöcke werden jetzt nach Startzeit aufsteigend angezeigt statt neueste zuerst. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3e61cd563d
commit
b39c67d1aa
1 file changed
+4
-1
@@ -31,7 +31,10 @@ export function TimelineSection() {
|
||||
const [editing, setEditing] = useState<string | null>(null);
|
||||
|
||||
if (listQuery.isPending) return null;
|
||||
const entries = listQuery.data?.entries ?? [];
|
||||
// Aufsteigend sortieren: Vormittag oben, Abend unten.
|
||||
const entries = [...(listQuery.data?.entries ?? [])].sort(
|
||||
(a, b) => new Date(a.startedAt).getTime() - new Date(b.startedAt).getTime(),
|
||||
);
|
||||
const totalSeconds = listQuery.data?.totalSeconds ?? 0;
|
||||
const todoTitles = new Map((todayQuery.data?.todos ?? []).map((t) => [t.id, t.title]));
|
||||
|
||||
|
||||
Reference in new issue
Block a user