2024-05-05 20:55:51 +00:00
|
|
|
'use client'
|
2024-05-04 21:04:30 +00:00
|
|
|
import LocationSearch from '@/components/LocationSearch';
|
|
|
|
import WeatherNow from '../components/WeatherNow'
|
2024-05-05 20:55:51 +00:00
|
|
|
import { useState } from 'react';
|
2024-05-06 21:22:57 +00:00
|
|
|
import { defaultState } from './defaultState';
|
|
|
|
import { coordType } from '@/types/types';
|
2024-05-07 19:18:51 +00:00
|
|
|
import WeatherIcon from '@/components/WeatherIcon';
|
2024-05-05 07:51:29 +00:00
|
|
|
|
2024-05-06 21:22:57 +00:00
|
|
|
const defaultGeoLocation: coordType = {
|
|
|
|
lat: 55.647229603577124,
|
|
|
|
lng: 12.54995987788925
|
|
|
|
}
|
2024-05-05 07:51:29 +00:00
|
|
|
|
2024-05-04 07:39:10 +00:00
|
|
|
export default function Home() {
|
2024-05-06 21:22:57 +00:00
|
|
|
const [geoLocation, setGeoLocation] = useState({
|
|
|
|
lat: 55.647229603577124,
|
|
|
|
lng: 12.54995987788925
|
|
|
|
});
|
2024-05-04 07:39:10 +00:00
|
|
|
return (
|
|
|
|
<main>
|
2024-05-04 21:04:30 +00:00
|
|
|
<div className='block mx-auto max-w-4xl'>
|
2024-05-06 21:22:57 +00:00
|
|
|
<LocationSearch setGeoLocation={setGeoLocation}/>
|
2024-05-07 19:18:51 +00:00
|
|
|
<WeatherIcon />
|
2024-05-06 21:22:57 +00:00
|
|
|
<WeatherNow geoLocation={geoLocation}/>
|
2024-05-04 21:04:30 +00:00
|
|
|
</div>
|
2024-05-03 14:48:24 +00:00
|
|
|
</main>
|
|
|
|
);
|
2024-05-04 13:40:23 +00:00
|
|
|
}
|