local-weather/app/defaultState.ts

108 lines
12 KiB
TypeScript
Raw Normal View History

import { HourlyForecast, coordType } from "@/types/types";
2024-05-05 20:55:51 +00:00
export const defaultState = {
results: [
{
address_components: [
{
long_name: "Sluseholmen",
short_name: "Sluseholmen",
types: ["route"],
},
{
long_name: "Vesterbro",
short_name: "Vesterbro",
types: ["political", "sublocality", "sublocality_level_1"],
},
{
long_name: "København",
short_name: "København",
types: ["locality", "political"],
},
{
long_name: "Denmark",
short_name: "DK",
types: ["country", "political"],
},
{
long_name: "2450",
short_name: "2450",
types: ["postal_code"],
},
],
formatted_address: "Sluseholmen, 2450 København, Denmark",
geometry: {
bounds: {
northeast: {
lat: 55.64754749999999,
lng: 12.5502837,
2024-05-05 20:55:51 +00:00
},
southwest: {
lat: 55.6435823,
lng: 12.5452758,
2024-05-05 20:55:51 +00:00
},
},
location: {
lat: 55.6452427,
lng: 12.5475522,
},
location_type: "GEOMETRIC_CENTER",
viewport: {
northeast: {
lat: 55.64754749999999,
lng: 12.5502837,
2024-05-05 20:55:51 +00:00
},
southwest: {
lat: 55.6435823,
lng: 12.5452758,
2024-05-05 20:55:51 +00:00
},
},
},
place_id: "ChIJBzR68YNUUkYRoxbRfFuUlEM",
types: ["route"],
},
],
status: "OK",
};
export const defaultForecast = {
coord: { lon: 12.5476, lat: 55.6452 },
weather: [
{ id: 803, main: "Clouds", description: "broken clouds", icon: "04n" },
],
base: "stations",
main: {
temp: 284.38,
feels_like: 283.83,
temp_min: 283.94,
temp_max: 285.38,
pressure: 1013,
humidity: 87,
},
visibility: 10000,
wind: { speed: 3.09, deg: 60 },
clouds: { all: 75 },
dt: 1715027131,
sys: {
type: 1,
id: 1575,
country: "DK",
sunrise: 1714965344,
sunset: 1715021822,
},
timezone: 7200,
id: 2618424,
name: "Copenhagen municipality",
cod: 200,
};
export const defaultGeoLocation: coordType = {
name: 'copenhagen',
geo:{
lat: 55.647229603577124,
lng: 12.54995987788925
}
}
export const defaultHourlyForecast: HourlyForecast =
{"latitude":52.52,"longitude":13.419998,"generationtime_ms":0.5199909210205078,"utc_offset_seconds":7200,"timezone":"Europe/Berlin","timezone_abbreviation":"CEST","elevation":38.0,"current_units":{"time":"iso8601","interval":"seconds","temperature_2m":"°C","apparent_temperature":"°C","is_day":"","precipitation":"mm","rain":"mm","showers":"mm","snowfall":"cm","weather_code":"wmo code","cloud_cover":"%","wind_speed_10m":"km/h","wind_direction_10m":"°"},"current":{"time":"2024-05-10T00:45","interval":900,"temperature_2m":12.8,"apparent_temperature":11.4,"is_day":0,"precipitation":0.00,"rain":0.00,"showers":0.00,"snowfall":0.00,"weather_code":3,"cloud_cover":100,"wind_speed_10m":3.2,"wind_direction_10m":63},"hourly_units":{"time":"iso8601","temperature_2m":"°C","apparent_temperature":"°C","precipitation_probability":"%","precipitation":"mm","weather_code":"wmo code","wind_speed_10m":"km/h","is_day":""},"hourly":{"time":["2024-05-10T00:00","2024-05-10T01:00","2024-05-10T02:00","2024-05-10T03:00","2024-05-10T04:00","2024-05-10T05:00","2024-05-10T06:00","2024-05-10T07:00","2024-05-10T08:00","2024-05-10T09:00","2024-05-10T10:00","2024-05-10T11:00","2024-05-10T12:00","2024-05-10T13:00","2024-05-10T14:00","2024-05-10T15:00","2024-05-10T16:00","2024-05-10T17:00","2024-05-10T18:00","2024-05-10T19:00","2024-05-10T20:00","2024-05-10T21:00","2024-05-10T22:00","2024-05-10T23:00","2024-05-11T00:00","2024-05-11T01:00","2024-05-11T02:00","2024-05-11T03:00","2024-05-11T04:00","2024-05-11T05:00","2024-05-11T06:00","2024-05-11T07:00","2024-05-11T08:00","2024-05-11T09:00","2024-05-11T10:00","2024-05-11T11:00","2024-05-11T12:00","2024-05-11T13:00","2024-05-11T14:00","2024-05-11T15:00","2024-05-11T16:00","2024-05-11T17:00","2024-05-11T18:00","2024-05-11T19:00","2024-05-11T20:00","2024-05-11T21:00","2024-05-11T22:00","2024-05-11T23:00","2024-05-12T00:00","2024-05-12T01:00","2024-05-12T02:00","2024-05-12T03:00","2024-05-12T04:00","2024-05-12T05:00","2024-05-12T06:00","2024-05-12T07:00","2024-05-12T08:00","2024-05-12T09:00","2024-05-12T10:00","2024-05-12T11:00","2024-05-12T12:00","2024-05-12T13:00","2024-05-12T14:00","2024-05-12T15:00","2024-05-12T16:00","2024-05-12T17:00","2024-05-12T18:00","2024-05-12T19:00","2024-05-12T20:00","2024-05-12T21:00","2024-05-12T22:00","2024-05-12T23:00","2024-05-13T00:00","2024-05-13T01:00","2024-05-13T02:00","2024-05-13T03:00","2024-05-13T04:00","2024-05-13T05:00","2024-05-13T06:00","2024-05-13T07:00","2024-05-13T08:00","2024-05-13T09:00","2024-05-13T10:00","2024-05-13T11:00","2024-05-13T12:00","2024-05-13T13:00","2024-05-13T14:00","2024-05-13T15:00","2024-05-13T16:00","2024-05-13T17:00","2024-05-13T18:00","2024-05-13T19:00","2024-05-13T20:00","2024-05-13T21:00","2024-05-13T22:00","2024-05-13T23:00","2024-05-14T00:00","2024-05-14T01:00","2024-05-14T02:00","2024-05-14T03:00","2024-05-14T04:00","2024-05-14T05:00","2024-05-14T06:00","2024-05-14T07:00","2024-05-14T08:00","2024-05-14T09:00","2024-05-14T10:00","2024-05-14T11:00","2024-05-14T12:00","2024-05-14T13:00","2024-05-14T14:00","2024-05-14T15:00","2024-05-14T16:00","2024-05-14T17:00","2024-05-14T18:00","2024-05-14T19:00","2024-05-14T20:00","2024-05-14T21:00","2024-05-14T22:00","2024-05-14T23:00","2024-05-15T00:00","2024-05-15T01:00","2024-05-15T02:00","2024-05-15T03:00","2024-05-15T04:00","2024-05-15T05:00","2024-05-15T06:00","2024-05-15T07:00","2024-05-15T08:00","2024-05-15T09:00","2024-05-15T10:00","2024-05-15T11:00","2024-05-15T12:00","2024-05-15T13:00","2024-05-15T14:00","2024-05-15T15:00","2024-05-15T16:00","2024-05-15T17:00","2024-05-15T18:00","2024-05-15T19:00","2024-05-15T20:00","2024-05-15T21:00","2024-05-15T22:00","2024-05-15T23:00","2024-05-16T00:00","2024-05-16T01:00","2024-05-16T02:00","2024-05-16T03:00","2024-05-16T04:00","2024-05-16T05:00","2024-05-16T06:00","2024-05-16T07:00","2024-05-16T08:00","2024-05-16T09:00","2024-05-16T10:00","2024-05-16T11:00","2024-05-16T12:00","2024-05-16T13:00","2024-05-16T14:00","2024-05-16T15:00","2024-05-16T16:00","2024-05-16T17:00","2024-05-16T18:00","2024-05-16T19:00","2024-05-16T20:00","2024-05-16T21:00","2024-