We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93e2682 commit 379f302Copy full SHA for 379f302
src/screens/Weather/api.ts
@@ -1,4 +1,5 @@
1
import S from '@utils/storage'
2
+import { Weather } from './types'
3
4
// export const ACCUWEATHER_API_KEY = 'FqLdDZQkQofVcwsdCHX7uKdPVgWcPGHI'
5
// export const ACCUWEATHER_API_KEY = 'C42OAAd8AANIyi8SLoqvq3mm59vADvRA'
@@ -101,8 +102,7 @@ export async function getLocation(lat: number, lon: number) {
101
102
103
export async function getWeather(lat: number, lon: number) {
104
console.log('Fetching weather for:', lat, lon)
- return await (await fetch(weatherUrl(lat, lon, OPENWEATHER_API_KEY))).json()
105
- // return demoWeather as Weather
+ return await (await fetch(weatherUrl(lat, lon, OPENWEATHER_API_KEY))).json() as Weather
106
}
107
108
export async function getAQI(lat: number, lon: number) {
0 commit comments