Skip to content

Commit 2ba295b

Browse files
authored
chore(next-intl): update to v4 (#7583)
1 parent 1b2acc4 commit 2ba295b

File tree

6 files changed

+53
-83
lines changed

6 files changed

+53
-83
lines changed

apps/site/app/[locale]/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Analytics } from '@vercel/analytics/react';
22
import { SpeedInsights } from '@vercel/speed-insights/next';
33
import classNames from 'classnames';
4+
import { NextIntlClientProvider } from 'next-intl';
45
import type { FC, PropsWithChildren } from 'react';
56

67
import BaseLayout from '@/layouts/Base';
78
import { VERCEL_ENV } from '@/next.constants.mjs';
89
import { IBM_PLEX_MONO, OPEN_SANS } from '@/next.fonts';
910
import { availableLocalesMap, defaultLocale } from '@/next.locales.mjs';
10-
import { LocaleProvider } from '@/providers/localeProvider';
1111
import { ThemeProvider } from '@/providers/themeProvider';
1212

1313
import '@/styles/index.css';
@@ -29,11 +29,11 @@ const RootLayout: FC<RotLayoutProps> = async ({ children, params }) => {
2929
suppressHydrationWarning
3030
>
3131
<body suppressHydrationWarning>
32-
<LocaleProvider>
32+
<NextIntlClientProvider>
3333
<ThemeProvider>
3434
<BaseLayout>{children}</BaseLayout>
3535
</ThemeProvider>
36-
</LocaleProvider>
36+
</NextIntlClientProvider>
3737

3838
<a
3939
rel="me"

apps/site/components/__mocks__/next-intl.mjs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
'use strict';
22

3-
export const useMessages = () => ({});
4-
5-
export const useNow = () => new Date();
6-
7-
export const useTimeZone = () => 'Etc/UTC';
8-
93
export const useTranslations = () => {
104
const t = key => key;
115

apps/site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"glob": "~11.0.1",
4545
"gray-matter": "~4.0.3",
4646
"next": "15.2.3",
47-
"next-intl": "~3.26.5",
47+
"next-intl": "~4.0.2",
4848
"next-themes": "~0.4.4",
4949
"postcss": "~8.5.3",
5050
"postcss-calc": "~10.1.1",

apps/site/providers/__tests__/localeProvider.test.mjs

Lines changed: 0 additions & 24 deletions
This file was deleted.

apps/site/providers/localeProvider.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

package-lock.json

Lines changed: 49 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)