work on next13

This commit is contained in:
ajnart
2023-01-23 01:34:36 +09:00
parent e47bbc966c
commit 9d566330be
20 changed files with 220 additions and 208 deletions

View File

@@ -73,6 +73,7 @@ function CalendarTile({ widget }: CalendarTileProps) {
style={{ position: 'relative', top: -15 }}
onMonthChange={setMonth}
size="xs"
locale={i18n.resolvedLanguage}
fullWidth
onChange={() => {}}
firstDayOfWeek={widget.properties.sundayStart ? 'sunday' : 'monday'}

View File

@@ -1,13 +1,11 @@
import {
ActionIcon,
Alert,
Button,
Center,
Code,
Group,
Pagination,
Progress,
ScrollArea,
Skeleton,
Stack,
Table,

View File

@@ -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(

View File

@@ -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&current_weather=true&timezone=Europe%2FLondon`
);
// eslint-disable-next-line consistent-return
return (await res.json()) as WeatherResponse;
};