- Update `next-intl` dependency from version 3.26.5 to 4.0.0 - Modify global type definitions to include new `Locale` and `Messages` types - Refactor various components and pages to use `Locale` type for params - Enhance internationalization handling by integrating `hasLocale` checks - Clean up imports and ensure consistent usage of `next-intl` features
15 lines
342 B
TypeScript
15 lines
342 B
TypeScript
import { routing } from '@/i18n/routing';
|
|
import messages from './messages/en.json';
|
|
|
|
/**
|
|
* next-intl 4.0.0
|
|
*
|
|
* https://github.com/amannn/next-intl/blob/main/examples/example-app-router/global.d.ts
|
|
*/
|
|
declare module 'next-intl' {
|
|
interface AppConfig {
|
|
Locale: (typeof routing.locales)[number];
|
|
Messages: typeof messages;
|
|
}
|
|
}
|