Enhance Providers component with time zone support

- Updated `RootLayout` to retrieve the user's time zone using `getTimeZone` from `next-intl/server`.
- Modified the `Providers` component to accept and pass the time zone prop to `NextIntlClientProvider`, improving localization capabilities.
This commit is contained in:
2026-04-01 18:21:16 +02:00
parent 79d9092d43
commit 75e5535a86
2 changed files with 15 additions and 3 deletions

View File

@@ -39,17 +39,23 @@ export function Providers({
initialToken,
locale,
messages,
timeZone,
}: {
children: ReactNode;
initialToken?: string | null;
locale?: string;
messages?: AbstractIntlMessages;
timeZone?: string;
}) {
const router = useRouter();
return (
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<NextIntlClientProvider locale={locale} messages={messages}>
<NextIntlClientProvider
locale={locale}
messages={messages}
timeZone={timeZone}
>
<ConvexBetterAuthProvider
client={convex}
authClient={authClient}