'use client'
import LocationSearch from '@/components/LocationSearch';
import WeatherNow from '../components/WeatherNow'
import { useState } from 'react';
import { defaultState } from './defaultState';
import { coordType } from '@/types/types';
import WeatherIcon from '@/components/WeatherIcon';

const defaultGeoLocation: coordType = {
  lat: 55.647229603577124,
  lng: 12.54995987788925
}

export default function Home() {
  const [geoLocation, setGeoLocation] = useState({
    lat: 55.647229603577124,
    lng: 12.54995987788925
  });
  return (
    <main>
      <div className='block mx-auto max-w-4xl'>
        <LocationSearch setGeoLocation={setGeoLocation}/>
        <WeatherIcon />
        <WeatherNow geoLocation={geoLocation}/>
      </div>
    </main>
  );
}