last fade attempt

This commit is contained in:
Vincent van der Wal
2026-08-06 21:37:28 +02:00
parent 810f9c2605
commit d0f94094ca
7 changed files with 77 additions and 45 deletions
@@ -98,7 +98,7 @@
$effect(() => {
const model = params.models?.[0];
if (!mounted || !model) return;
syncSearchParams(get(page).url, { model: unlessDefault(model, DEFAULT_MODEL) });
syncSearchParams({ model: unlessDefault(model, DEFAULT_MODEL) });
});
// components persist across refetches; entries are null while unmounted
@@ -134,7 +134,7 @@
const models = params.models;
const vars = params.hourly;
if (!mounted) return;
syncSearchParams(get(page).url, {
syncSearchParams({
models: listUnlessDefault(models, DEFAULT_MODELS),
vars: listUnlessDefault(vars, DEFAULT_VARS)
});
@@ -273,7 +273,7 @@
const isToday = fetchedDaily
? dayKey === formatZoned(new Date(), fetchedDaily.timezone, 'yyyy-MM-dd')
: false;
syncSearchParams(get(page).url, {
syncSearchParams({
day: isToday ? null : dayKey,
model: unlessDefault(model, 'best_match')
});