local-weather/app/defaultState.ts
ChrQR 7b97a0eb65 Fixed some things.
Need to fix google places call. It is refreshing the page when receiving the data, thus resetting the state.

It's a job for tomorrow.
2024-05-06 23:22:57 +02:00

96 lines
2.1 KiB
TypeScript

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,
},
southwest: {
lat: 55.6435823,
lng: 12.5452758,
},
},
location: {
lat: 55.6452427,
lng: 12.5475522,
},
location_type: "GEOMETRIC_CENTER",
viewport: {
northeast: {
lat: 55.64754749999999,
lng: 12.5502837,
},
southwest: {
lat: 55.6435823,
lng: 12.5452758,
},
},
},
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,
};