|
{nzb.state === 'paused' ? (
-
+
) : (
-
+
diff --git a/src/widgets/weather/WeatherIcon.tsx b/src/widgets/weather/WeatherIcon.tsx
index f74175867..0ee71f70c 100644
--- a/src/widgets/weather/WeatherIcon.tsx
+++ b/src/widgets/weather/WeatherIcon.tsx
@@ -11,7 +11,6 @@ import {
IconSun,
} from '@tabler/icons-react';
import { useTranslation } from 'next-i18next';
-import { useElementSize } from '@mantine/hooks';
interface WeatherIconProps {
code: number;
@@ -25,8 +24,7 @@ interface WeatherIconProps {
*/
export const WeatherIcon = ({ code, size=50 }: WeatherIconProps) => {
const { t } = useTranslation('modules/weather');
- const { width, ref } = useElementSize();
-
+
const { icon: Icon, name } =
weatherDefinitions.find((wd) => wd.codes.includes(code)) ?? unknownWeather;
diff --git a/src/widgets/weather/WeatherTile.tsx b/src/widgets/weather/WeatherTile.tsx
index a4443d7cd..8514bbcfc 100644
--- a/src/widgets/weather/WeatherTile.tsx
+++ b/src/widgets/weather/WeatherTile.tsx
@@ -4,7 +4,6 @@ import {
IconArrowDownRight,
IconArrowUpRight,
IconCloudRain,
- IconCurrentLocation,
IconMapPin,
} from '@tabler/icons-react';
import { api } from '~/utils/api';
@@ -12,6 +11,7 @@ import { api } from '~/utils/api';
import { defineWidget } from '../helper';
import { IWidget } from '../widgets';
import { WeatherIcon } from './WeatherIcon';
+import { useTranslation } from 'react-i18next';
const definition = defineWidget({
id: 'weather',
@@ -52,6 +52,7 @@ interface WeatherTileProps {
function WeatherTile({ widget }: WeatherTileProps) {
const { data: weather, isLoading, isError } = api.weather.at.useQuery(widget.properties.location);
const { width, ref } = useElementSize();
+ const { t } = useTranslation('modules/weather');
if (isLoading) {
return (
@@ -77,7 +78,7 @@ function WeatherTile({ widget }: WeatherTileProps) {
if (isError) {
return (
- An error occured
+ {t('error')}
);
}
|