This commit is contained in:
Vincent van der Wal
2026-08-06 19:11:11 +02:00
parent 025623aaa6
commit f4a02a208c
21 changed files with 336 additions and 78 deletions
@@ -49,7 +49,7 @@
let { data }: { data: PageData } = $props();
// the page cross-fade waits for this before revealing the new page
reportPageReady(() => fetchedDaily != null && fetchedHourly != null);
reportPageReady(() => (fetchedDaily != null && fetchedHourly != null) || loadError != null);
useHeroActions(heroActions);
@@ -211,8 +211,13 @@
// Charts intentionally keep their current range: they show the full week
// unless the user narrows it via the range presets or Ctrl+scroll.
// A model that answers with a broken timestamp must not be able to park an
// unreadable date in `selectedDay`: everything downstream formats it, and a
// date that cannot be formatted takes the page with it.
const switchDay = (date: Date) => {
runDayTransition(() => selectedDay.setTime(date.getTime()));
const time = date?.getTime();
if (!Number.isFinite(time)) return;
runDayTransition(() => selectedDay.setTime(time));
};
onMount(() => {