feat: add temperature unit preference

This commit is contained in:
zv
2026-06-13 21:05:01 +02:00
parent 66ead03f49
commit cb113714f9
24 changed files with 150 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
import type { Language } from "@/lib/i18n";
import type { Province } from "@/types/province";
import type { WindSpeedUnit } from "@/types/units";
import type { TemperatureUnit, WindSpeedUnit } from "@/types/units";
interface VapidKeyResponse {
configured: boolean;
@@ -20,6 +20,7 @@ interface SavePushSubscriptionOptions {
longitude?: number | null;
locationName?: string | null;
countyTeryt?: string | null;
temperatureUnit?: TemperatureUnit;
windSpeedUnit?: WindSpeedUnit;
}
@@ -38,6 +39,7 @@ export async function savePushSubscription(subscription: PushSubscription, provi
longitude: options.longitude ?? null,
locationName: options.locationName ?? null,
countyTeryt: options.countyTeryt ?? null,
temperatureUnit: options.temperatureUnit,
windSpeedUnit: options.windSpeedUnit,
}),
});