Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cef3f42a0b | ||
|
|
319a083c6d | ||
|
|
8e7fa782b3 |
No files matched your search
@@ -0,0 +1,29 @@
|
|||||||
|
import type { QueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
import { isPersistableWidgetQueryKey } from "@homarr/api/query-cache";
|
||||||
|
|
||||||
|
export const createQueryCacheErrorCleanup = (queryClient: QueryClient): (() => void) => {
|
||||||
|
const wasSuccessful = new Set<string>();
|
||||||
|
|
||||||
|
return queryClient.getQueryCache().subscribe((event) => {
|
||||||
|
const query = event.query;
|
||||||
|
const key = query.queryHash;
|
||||||
|
|
||||||
|
if (event.type === "removed") {
|
||||||
|
wasSuccessful.delete(key);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.type !== "updated") return;
|
||||||
|
|
||||||
|
if (query.state.status === "success" && isPersistableWidgetQueryKey(query.queryKey)) {
|
||||||
|
wasSuccessful.add(key);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (query.state.status === "error" && wasSuccessful.has(key)) {
|
||||||
|
queryClient.resetQueries({ queryKey: query.queryKey, exact: true });
|
||||||
|
wasSuccessful.delete(key);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { PropsWithChildren } from "react";
|
import type { PropsWithChildren } from "react";
|
||||||
import { useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import type { QueryKey } from "@tanstack/react-query";
|
import type { QueryKey } from "@tanstack/react-query";
|
||||||
import { QueryClient } from "@tanstack/react-query";
|
import { QueryClient } from "@tanstack/react-query";
|
||||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||||
@@ -36,6 +36,7 @@ import { env } from "@homarr/common/env";
|
|||||||
import { showWarningNotification } from "@homarr/notifications";
|
import { showWarningNotification } from "@homarr/notifications";
|
||||||
import { widgetImports } from "@homarr/widgets";
|
import { widgetImports } from "@homarr/widgets";
|
||||||
|
|
||||||
|
import { createQueryCacheErrorCleanup } from "./query-cache-error-cleanup";
|
||||||
import { createWidgetQueryPersister } from "./query-cache-persister";
|
import { createWidgetQueryPersister } from "./query-cache-persister";
|
||||||
|
|
||||||
const getWebSocketProtocol = () => {
|
const getWebSocketProtocol = () => {
|
||||||
@@ -102,6 +103,10 @@ export function TRPCReactProvider(props: PropsWithChildren) {
|
|||||||
return client;
|
return client;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
return createQueryCacheErrorCleanup(queryClient);
|
||||||
|
}, [queryClient]);
|
||||||
|
|
||||||
const [trpcClient] = useState(() => {
|
const [trpcClient] = useState(() => {
|
||||||
return clientApi.createClient({
|
return clientApi.createClient({
|
||||||
links: [
|
links: [
|
||||||
@@ -162,6 +167,9 @@ export function TRPCReactProvider(props: PropsWithChildren) {
|
|||||||
query.state.status === "success" && isPersistableWidgetQueryKey(query.queryKey),
|
query.state.status === "success" && isPersistableWidgetQueryKey(query.queryKey),
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
onSuccess={() => {
|
||||||
|
queryClient.invalidateQueries({ predicate: (query) => isPersistableWidgetQueryKey(query.queryKey) });
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<ReactQueryStreamedHydration transformer={superjson}>{props.children}</ReactQueryStreamedHydration>
|
<ReactQueryStreamedHydration transformer={superjson}>{props.children}</ReactQueryStreamedHydration>
|
||||||
<ReactQueryDevtools initialIsOpen={false} />
|
<ReactQueryDevtools initialIsOpen={false} />
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import { useItemActions } from "./item-actions";
|
|||||||
import itemContentClasses from "./item-content.module.css";
|
import itemContentClasses from "./item-content.module.css";
|
||||||
import { BoardItemMenu } from "./item-menu";
|
import { BoardItemMenu } from "./item-menu";
|
||||||
import { WidgetContextMenu } from "./widget-context-menu";
|
import { WidgetContextMenu } from "./widget-context-menu";
|
||||||
|
import { removePersistedWidgetQueries } from "./widget-query-recovery";
|
||||||
|
|
||||||
interface BoardItemContentProps {
|
interface BoardItemContentProps {
|
||||||
item: SectionItem;
|
item: SectionItem;
|
||||||
@@ -112,7 +113,7 @@ const InnerContent = ({ item, ...dimensions }: InnerContentProps) => {
|
|||||||
{({ reset }) => (
|
{({ reset }) => (
|
||||||
<ErrorBoundary
|
<ErrorBoundary
|
||||||
onReset={() => {
|
onReset={() => {
|
||||||
void queryClient.invalidateQueries({ queryKey: [["widget"]] });
|
removePersistedWidgetQueries(queryClient);
|
||||||
reset();
|
reset();
|
||||||
}}
|
}}
|
||||||
fallbackRender={({ resetErrorBoundary, error }) => (
|
fallbackRender={({ resetErrorBoundary, error }) => (
|
||||||
|
|||||||
@@ -0,0 +1,157 @@
|
|||||||
|
import { QueryClient } from "@tanstack/react-query";
|
||||||
|
import { describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
import { isPersistableWidgetQueryKey } from "@homarr/api/query-cache";
|
||||||
|
|
||||||
|
import { createQueryCacheErrorCleanup } from "~/app/[locale]/_client-providers/query-cache-error-cleanup";
|
||||||
|
import { removePersistedWidgetQueries } from "./widget-query-recovery";
|
||||||
|
|
||||||
|
describe("removePersistedWidgetQueries", () => {
|
||||||
|
test("removes stale widget queries and allows fresh data to be fetched", async () => {
|
||||||
|
const queryClient = new QueryClient();
|
||||||
|
const crashedWidgetQueryKey = [["widget", "mediaServer", "getCurrentStreams"], { input: {} }];
|
||||||
|
const unrelatedQueryKey = [["user", "me"], { input: {} }];
|
||||||
|
|
||||||
|
queryClient.setQueryData(crashedWidgetQueryKey, "stale");
|
||||||
|
queryClient.setQueryData(unrelatedQueryKey, "unrelated");
|
||||||
|
|
||||||
|
removePersistedWidgetQueries(queryClient);
|
||||||
|
|
||||||
|
expect(queryClient.getQueryData(crashedWidgetQueryKey)).toBeUndefined();
|
||||||
|
expect(queryClient.getQueryData(unrelatedQueryKey)).toBe("unrelated");
|
||||||
|
await expect(
|
||||||
|
queryClient.fetchQuery({ queryKey: crashedWidgetQueryKey, queryFn: () => Promise.resolve("fresh") }),
|
||||||
|
).resolves.toBe("fresh");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("removes persisted queries outside the widget router", () => {
|
||||||
|
const queryClient = new QueryClient();
|
||||||
|
const dockerQueryKey = [["docker", "getContainers"], { input: {} }];
|
||||||
|
const appQueryKey = [["app", "byId"], { input: {} }];
|
||||||
|
const unrelatedQueryKey = [["user", "me"], { input: {} }];
|
||||||
|
|
||||||
|
queryClient.setQueryData(dockerQueryKey, "stale");
|
||||||
|
queryClient.setQueryData(appQueryKey, "stale");
|
||||||
|
queryClient.setQueryData(unrelatedQueryKey, "unrelated");
|
||||||
|
|
||||||
|
removePersistedWidgetQueries(queryClient);
|
||||||
|
|
||||||
|
expect(queryClient.getQueryData(dockerQueryKey)).toBeUndefined();
|
||||||
|
expect(queryClient.getQueryData(appQueryKey)).toBeUndefined();
|
||||||
|
expect(queryClient.getQueryData(unrelatedQueryKey)).toBe("unrelated");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("removes persisted widget queries when the widget kind and query path differ", () => {
|
||||||
|
const queryClient = new QueryClient();
|
||||||
|
const crashedWidgetQueryKey = [["widget", "anchorNotes", "getNote"], { input: {} }];
|
||||||
|
const unrelatedQueryKey = [["user", "me"], { input: {} }];
|
||||||
|
|
||||||
|
queryClient.setQueryData(crashedWidgetQueryKey, "stale");
|
||||||
|
queryClient.setQueryData(unrelatedQueryKey, "unrelated");
|
||||||
|
|
||||||
|
removePersistedWidgetQueries(queryClient);
|
||||||
|
|
||||||
|
expect(queryClient.getQueryData(crashedWidgetQueryKey)).toBeUndefined();
|
||||||
|
expect(queryClient.getQueryData(unrelatedQueryKey)).toBe("unrelated");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("query cache error cleanup", () => {
|
||||||
|
test("resets data when a persistable query transitions from success to error", async () => {
|
||||||
|
const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
|
||||||
|
const unsubscribe = createQueryCacheErrorCleanup(queryClient);
|
||||||
|
|
||||||
|
const widgetKey = [["widget", "mediaServer", "getCurrentStreams"], { input: {} }];
|
||||||
|
const userKey = [["user", "me"], { input: {} }];
|
||||||
|
|
||||||
|
queryClient.setQueryData(widgetKey, { old: true });
|
||||||
|
queryClient.setQueryData(userKey, { user: true });
|
||||||
|
|
||||||
|
await queryClient
|
||||||
|
.fetchQuery({ queryKey: widgetKey, queryFn: () => Promise.reject(new Error("API down")) })
|
||||||
|
.catch(() => {});
|
||||||
|
|
||||||
|
expect(queryClient.getQueryData(widgetKey)).toBeUndefined();
|
||||||
|
expect(queryClient.getQueryData(userKey)).toEqual({ user: true });
|
||||||
|
|
||||||
|
unsubscribe();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("preserves stale data for non-persistable query errors", async () => {
|
||||||
|
const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
|
||||||
|
const unsubscribe = createQueryCacheErrorCleanup(queryClient);
|
||||||
|
|
||||||
|
const boardKey = [["board", "getBoardByName"], { input: {} }];
|
||||||
|
|
||||||
|
queryClient.setQueryData(boardKey, { boards: [] });
|
||||||
|
|
||||||
|
await queryClient
|
||||||
|
.fetchQuery({ queryKey: boardKey, queryFn: () => Promise.reject(new Error("API down")) })
|
||||||
|
.catch(() => {});
|
||||||
|
|
||||||
|
expect(queryClient.getQueryData(boardKey)).toEqual({ boards: [] });
|
||||||
|
|
||||||
|
unsubscribe();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("handles success→error→success→error cycling without getting stuck", async () => {
|
||||||
|
const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
|
||||||
|
const unsubscribe = createQueryCacheErrorCleanup(queryClient);
|
||||||
|
|
||||||
|
const widgetKey = [["widget", "mediaServer", "getCurrentStreams"], { input: {} }];
|
||||||
|
|
||||||
|
queryClient.setQueryData(widgetKey, "first-success");
|
||||||
|
await queryClient.fetchQuery({ queryKey: widgetKey, queryFn: () => Promise.resolve("second-success") });
|
||||||
|
expect(queryClient.getQueryData(widgetKey)).toBe("second-success");
|
||||||
|
|
||||||
|
await queryClient
|
||||||
|
.fetchQuery({ queryKey: widgetKey, queryFn: () => Promise.reject(new Error("boom")) })
|
||||||
|
.catch(() => {});
|
||||||
|
expect(queryClient.getQueryData(widgetKey)).toBeUndefined();
|
||||||
|
|
||||||
|
await queryClient.fetchQuery({ queryKey: widgetKey, queryFn: () => Promise.resolve("third-success") });
|
||||||
|
expect(queryClient.getQueryData(widgetKey)).toBe("third-success");
|
||||||
|
|
||||||
|
await queryClient
|
||||||
|
.fetchQuery({ queryKey: widgetKey, queryFn: () => Promise.reject(new Error("boom-2")) })
|
||||||
|
.catch(() => {});
|
||||||
|
expect(queryClient.getQueryData(widgetKey)).toBeUndefined();
|
||||||
|
|
||||||
|
unsubscribe();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("unsubscribe stops processing further events", async () => {
|
||||||
|
const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
|
||||||
|
const unsubscribe = createQueryCacheErrorCleanup(queryClient);
|
||||||
|
|
||||||
|
const widgetKey = [["widget", "mediaServer", "getCurrentStreams"], { input: {} }];
|
||||||
|
queryClient.setQueryData(widgetKey, "stale");
|
||||||
|
|
||||||
|
unsubscribe();
|
||||||
|
|
||||||
|
await queryClient
|
||||||
|
.fetchQuery({ queryKey: widgetKey, queryFn: () => Promise.reject(new Error("API down")) })
|
||||||
|
.catch(() => {});
|
||||||
|
|
||||||
|
expect(queryClient.getQueryData(widgetKey)).toBe("stale");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("rehydration marks persistable data as stale", () => {
|
||||||
|
test("rehydrated queries are invalidated so they refetch on mount", async () => {
|
||||||
|
const queryClient = new QueryClient({
|
||||||
|
defaultOptions: { queries: { retry: false, staleTime: 0 } },
|
||||||
|
});
|
||||||
|
|
||||||
|
const widgetKey = [["widget", "mediaServer", "getCurrentStreams"], { input: {} }];
|
||||||
|
const userKey = [["user", "me"], { input: {} }];
|
||||||
|
|
||||||
|
queryClient.setQueryData(widgetKey, { rehydrated: true });
|
||||||
|
queryClient.setQueryData(userKey, { rehydrated: true });
|
||||||
|
|
||||||
|
queryClient.invalidateQueries({ predicate: (query) => isPersistableWidgetQueryKey(query.queryKey) });
|
||||||
|
|
||||||
|
expect(queryClient.getQueryState(widgetKey)?.isInvalidated).toBe(true);
|
||||||
|
expect(queryClient.getQueryState(userKey)?.isInvalidated).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import type { QueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
import { isPersistableWidgetQueryKey } from "@homarr/api/query-cache";
|
||||||
|
|
||||||
|
export const removePersistedWidgetQueries = (queryClient: QueryClient) => {
|
||||||
|
queryClient.removeQueries({ predicate: (query) => isPersistableWidgetQueryKey(query.queryKey) });
|
||||||
|
};
|
||||||
@@ -9,7 +9,7 @@ export const weatherRequestHandler = createWidgetRequestHandler({
|
|||||||
async requestAsync(input: { latitude: number; longitude: number }) {
|
async requestAsync(input: { latitude: number; longitude: number }) {
|
||||||
const res = await withTimeoutAsync(async (signal) => {
|
const res = await withTimeoutAsync(async (signal) => {
|
||||||
return await fetchWithTrustedCertificatesAsync(
|
return await fetchWithTrustedCertificatesAsync(
|
||||||
`https://api.open-meteo.com/v1/forecast?latitude=${input.latitude}&longitude=${input.longitude}&daily=weathercode,temperature_2m_max,temperature_2m_min,sunrise,sunset,wind_speed_10m_max,wind_gusts_10m_max¤t_weather=true&timezone=auto`,
|
`https://api.open-meteo.com/v1/forecast?latitude=${input.latitude}&longitude=${input.longitude}&daily=weathercode,temperature_2m_max,temperature_2m_min,sunrise,sunset,wind_speed_10m_max,wind_gusts_10m_max,relative_humidity_2m_mean¤t_weather=true&timezone=auto`,
|
||||||
{ signal },
|
{ signal },
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -27,6 +27,7 @@ export const weatherRequestHandler = createWidgetRequestHandler({
|
|||||||
sunset: weather.daily.sunset[index],
|
sunset: weather.daily.sunset[index],
|
||||||
maxWindSpeed: weather.daily.wind_speed_10m_max[index],
|
maxWindSpeed: weather.daily.wind_speed_10m_max[index],
|
||||||
maxWindGusts: weather.daily.wind_gusts_10m_max[index],
|
maxWindGusts: weather.daily.wind_gusts_10m_max[index],
|
||||||
|
humidity: weather.daily.relative_humidity_2m_mean[index],
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
} satisfies Weather;
|
} satisfies Weather;
|
||||||
@@ -48,6 +49,7 @@ const atLocationOutput = z.object({
|
|||||||
sunset: z.array(z.string()),
|
sunset: z.array(z.string()),
|
||||||
wind_speed_10m_max: z.array(z.number()),
|
wind_speed_10m_max: z.array(z.number()),
|
||||||
wind_gusts_10m_max: z.array(z.number()),
|
wind_gusts_10m_max: z.array(z.number()),
|
||||||
|
relative_humidity_2m_mean: z.array(z.number()),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -66,5 +68,6 @@ export interface Weather {
|
|||||||
sunset: string | undefined;
|
sunset: string | undefined;
|
||||||
maxWindSpeed: number | undefined;
|
maxWindSpeed: number | undefined;
|
||||||
maxWindGusts: number | undefined;
|
maxWindGusts: number | undefined;
|
||||||
|
humidity: number | undefined;
|
||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
@@ -2257,7 +2257,8 @@
|
|||||||
"sunrise": "Sunrise",
|
"sunrise": "Sunrise",
|
||||||
"sunset": "Sunset",
|
"sunset": "Sunset",
|
||||||
"maxWindSpeed": "Max wind speed: {maxWindSpeed} {unit}",
|
"maxWindSpeed": "Max wind speed: {maxWindSpeed} {unit}",
|
||||||
"maxWindGusts": "Max wind gusts: {maxWindGusts} {unit}"
|
"maxWindGusts": "Max wind gusts: {maxWindGusts} {unit}",
|
||||||
|
"humidity": "Humidity: {humidity}%"
|
||||||
},
|
},
|
||||||
"kind": {
|
"kind": {
|
||||||
"clear": "Clear",
|
"clear": "Clear",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Box, Group, HoverCard, Stack, Text } from "@mantine/core";
|
import { Box, Group, HoverCard, Stack, Text } from "@mantine/core";
|
||||||
import { IconArrowDownRight, IconArrowUpRight, IconMapPin, IconWind } from "@tabler/icons-react";
|
import { IconArrowDownRight, IconArrowUpRight, IconDroplets, IconMapPin, IconWind } from "@tabler/icons-react";
|
||||||
import combineClasses from "clsx";
|
import combineClasses from "clsx";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
@@ -87,6 +87,12 @@ const DailyWeather = ({ options, weather }: WeatherProps) => {
|
|||||||
</Text>
|
</Text>
|
||||||
</Group>
|
</Group>
|
||||||
)}
|
)}
|
||||||
|
{weather.daily[0]?.humidity !== undefined && (
|
||||||
|
<Group className="weather-humidity-group" wrap="nowrap" gap="xs">
|
||||||
|
<IconDroplets size={16} />
|
||||||
|
<Text fz={16}>{t("dailyForecast.humidity", { humidity: weather.daily[0].humidity })}</Text>
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
<Group className="weather-max-min-temp-group" wrap="nowrap" gap="sm">
|
<Group className="weather-max-min-temp-group" wrap="nowrap" gap="sm">
|
||||||
<Group gap="xs" wrap="nowrap">
|
<Group gap="xs" wrap="nowrap">
|
||||||
<IconArrowUpRight size={16} />
|
<IconArrowUpRight size={16} />
|
||||||
@@ -204,6 +210,7 @@ function Forecast({ weather, options }: WeatherProps) {
|
|||||||
sunset={dayjs(dayWeather.sunset).format("HH:mm")}
|
sunset={dayjs(dayWeather.sunset).format("HH:mm")}
|
||||||
maxWindSpeed={dayWeather.maxWindSpeed}
|
maxWindSpeed={dayWeather.maxWindSpeed}
|
||||||
maxWindGusts={dayWeather.maxWindGusts}
|
maxWindGusts={dayWeather.maxWindGusts}
|
||||||
|
humidity={dayWeather.humidity}
|
||||||
/>
|
/>
|
||||||
</HoverCard.Dropdown>
|
</HoverCard.Dropdown>
|
||||||
</HoverCard>
|
</HoverCard>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
IconCloudRain,
|
IconCloudRain,
|
||||||
IconCloudSnow,
|
IconCloudSnow,
|
||||||
IconCloudStorm,
|
IconCloudStorm,
|
||||||
|
IconDroplets,
|
||||||
IconMoon,
|
IconMoon,
|
||||||
IconQuestionMark,
|
IconQuestionMark,
|
||||||
IconSnowflake,
|
IconSnowflake,
|
||||||
@@ -51,6 +52,7 @@ interface WeatherDescriptionProps {
|
|||||||
sunset?: string;
|
sunset?: string;
|
||||||
maxWindSpeed?: number;
|
maxWindSpeed?: number;
|
||||||
maxWindGusts?: number;
|
maxWindGusts?: number;
|
||||||
|
humidity?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -78,6 +80,7 @@ export const WeatherDescription = ({
|
|||||||
sunset,
|
sunset,
|
||||||
maxWindSpeed,
|
maxWindSpeed,
|
||||||
maxWindGusts,
|
maxWindGusts,
|
||||||
|
humidity,
|
||||||
}: WeatherDescriptionProps) => {
|
}: WeatherDescriptionProps) => {
|
||||||
const t = useScopedI18n("widget.weather");
|
const t = useScopedI18n("widget.weather");
|
||||||
const tCommon = useScopedI18n("common");
|
const tCommon = useScopedI18n("common");
|
||||||
@@ -97,6 +100,9 @@ export const WeatherDescription = ({
|
|||||||
<List.Item icon={<IconTemperatureMinus size={15} />}>{`${tCommon("information.min")}: ${minTemp}`}</List.Item>
|
<List.Item icon={<IconTemperatureMinus size={15} />}>{`${tCommon("information.min")}: ${minTemp}`}</List.Item>
|
||||||
<List.Item icon={<IconSun size={15} />}>{`${t("dailyForecast.sunrise")}: ${sunrise}`}</List.Item>
|
<List.Item icon={<IconSun size={15} />}>{`${t("dailyForecast.sunrise")}: ${sunrise}`}</List.Item>
|
||||||
<List.Item icon={<IconMoon size={15} />}>{`${t("dailyForecast.sunset")}: ${sunset}`}</List.Item>
|
<List.Item icon={<IconMoon size={15} />}>{`${t("dailyForecast.sunset")}: ${sunset}`}</List.Item>
|
||||||
|
{humidity !== undefined && (
|
||||||
|
<List.Item icon={<IconDroplets size={15} />}>{t("dailyForecast.humidity", { humidity })}</List.Item>
|
||||||
|
)}
|
||||||
{maxWindSpeed !== undefined && (
|
{maxWindSpeed !== undefined && (
|
||||||
<List.Item icon={<IconWind size={15} />}>
|
<List.Item icon={<IconWind size={15} />}>
|
||||||
{t("dailyForecast.maxWindSpeed", {
|
{t("dailyForecast.maxWindSpeed", {
|
||||||
|
|||||||
Reference in new issue
Block a user