work on next13
This commit is contained in:
@@ -76,7 +76,7 @@ function WeatherTile({ widget }: WeatherTileProps) {
|
||||
align="center"
|
||||
style={{ height: '100%', width: '100%' }}
|
||||
>
|
||||
<Group align={'center'} position="center" spacing="xs">
|
||||
<Group align="center" position="center" spacing="xs">
|
||||
<WeatherIcon code={weather!.current_weather.weathercode} />
|
||||
<Title>
|
||||
{getPerferedUnit(
|
||||
|
||||
@@ -47,6 +47,7 @@ const fetchWeather = async (coordinates?: Coordinates) => {
|
||||
const res = await fetch(
|
||||
`https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&daily=weathercode,temperature_2m_max,temperature_2m_min¤t_weather=true&timezone=Europe%2FLondon`
|
||||
);
|
||||
// eslint-disable-next-line consistent-return
|
||||
return (await res.json()) as WeatherResponse;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user