From 66b45bfdc6e81bfe42686942defa0d1a433e0911 Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 8 Jun 2024 19:00:33 +0200 Subject: [PATCH] fix errors because of wrong suncalc result conversion --- packages/app/src/theme/api.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/app/src/theme/api.ts b/packages/app/src/theme/api.ts index 362ce916..750a6323 100644 --- a/packages/app/src/theme/api.ts +++ b/packages/app/src/theme/api.ts @@ -133,12 +133,13 @@ export const fixSuncalc = (suncalc: SunCalc) => { // Drop invalid values if (typeof v !== 'number') return {}; switch (k) { - case 'nightEnd': - // Fix key name - return { dawn: v }; + case 'dusk': + return { night: v }; + case 'solarNoon': + return { midday: v }; case 'sunrise': case 'sunset': - case 'night': + case 'dawn': // Keep valid values return { [k]: v }; default: