diff --git a/src/components/day/day-sections.tsx b/src/components/day/day-sections.tsx index a4adfb11e..e2b627778 100644 --- a/src/components/day/day-sections.tsx +++ b/src/components/day/day-sections.tsx @@ -215,13 +215,11 @@ export function DayRunning({ }: { items: readonly DayRunningItem[]; /** The viewed day; a start date in another year names its year. */ - date?: DateKey; + date: DateKey; }) { const { t, locale } = useTranslations(); if (items.length === 0) return null; - const viewedYear = date - ? date.slice(0, 4) - : String(new Date().getUTCFullYear()); + const viewedYear = date.slice(0, 4); const intlLocale = resolveIntlLocale(locale); const sinceText = (since: string): string => new Intl.DateTimeFormat(intlLocale, { diff --git a/src/components/day/day-view.tsx b/src/components/day/day-view.tsx index 1cfd7d6b1..e8d4b145c 100644 --- a/src/components/day/day-view.tsx +++ b/src/components/day/day-view.tsx @@ -332,7 +332,7 @@ export function DayView({

) : ( <> - + {data.values.length > 0 ? (
diff --git a/src/components/timeline/__tests__/timeline-components.test.tsx b/src/components/timeline/__tests__/timeline-components.test.tsx index 5a1ffdfb8..0a6613dd8 100644 --- a/src/components/timeline/__tests__/timeline-components.test.tsx +++ b/src/components/timeline/__tests__/timeline-components.test.tsx @@ -143,7 +143,7 @@ describe("chronicle", () => { )} />, ); - expect(html).toContain("April bis Oktober 2026 · keine Einträge"); + expect(html).toContain("April bis Oktober 2026 ohne Einträge"); expect(html).toContain("Dauerhaft"); expect(html).toContain("2 Allergien"); expect(html).toContain("Erkältung vorbei");