Working on dnd

This commit is contained in:
2024-09-19 16:55:33 +02:00
parent ba10c02d0f
commit 6fb84c97fe
8 changed files with 48 additions and 12 deletions

View File

@@ -3,13 +3,13 @@ import type { WeatherType } from '~~/types/types'
const { coords, error } = useGeolocation()
const { data, status, refresh } = await useAsyncData<WeatherType>(async () => await useRequestFetch<WeatherType>()('/api/weather', {
const { data, status, refresh, error: errorFe } = await useAsyncData<WeatherType>(async () => await useRequestFetch<WeatherType>()('/api/weather', {
method: 'GET',
query: {
lon: coords.value.longitude,
lat: coords.value.latitude,
},
}))
}), { lazy: true, immediate: false })
watchOnce(coords, async () => await refresh())