fix: canonicalize widget date locales

This commit is contained in:
Thomas Camlong committed 2026-08-02 16:32:59 +02:00
1 parent 54e444d69d
commit d86293de0f
10 files changed
+41 -15

No files matched your search

+2 -4
View File
@@ -1,7 +1,6 @@
"use client";
import { useMemo, useState } from "react";
import { useParams } from "next/navigation";
import { ActionIcon, Box, Center, Group, Loader, Stack, Text, Tooltip, useMantineTheme } from "@mantine/core";
import { Calendar } from "@mantine/dates";
import { useElementSize } from "@mantine/hooks";
@@ -13,7 +12,7 @@ import { clientApi } from "@homarr/api/client";
import { useRequiredBoard } from "@homarr/boards/context";
import type { CalendarEvent } from "@homarr/integrations/types";
import { useSettings } from "@homarr/settings";
import { useScopedI18n } from "@homarr/translation/client";
import { useCurrentIntlLocale, useScopedI18n } from "@homarr/translation/client";
import actionTargetClasses from "../common/action-target.module.css";
import type { WidgetComponentProps } from "../definition";
@@ -115,8 +114,7 @@ const CalendarBase = ({
options,
displayMode,
}: CalendarBaseProps) => {
const params = useParams();
const locale = params.locale as string;
const locale = useCurrentIntlLocale();
const { firstDayOfWeek } = useSettings();
const board = useRequiredBoard();
const mantineTheme = useMantineTheme();