Update src/i18n.ts
This commit is contained in:
10
src/i18n.ts
10
src/i18n.ts
@@ -1,11 +1,5 @@
|
||||
import { getRequestConfig } from 'next-intl';
|
||||
import { notFound } from 'next/navigation';
|
||||
|
||||
|
||||
import { locales } from './config';
|
||||
|
||||
export default getRequestConfig(async ({ locale }) => {
|
||||
if (!locales.includes(locale as any)) notFound();
|
||||
|
||||
return {
|
||||
messages: (await import(`../messages/${locale}.json`)).default,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user