📝 priettier check
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 18s

This commit is contained in:
RJ
2025-12-04 15:57:39 +02:00
parent b68325123b
commit 101624c4d5
32 changed files with 185 additions and 172 deletions

View File

@@ -1,5 +1,4 @@
import {createNavigation} from 'next-intl/navigation';
import {routing} from './routing';
import { createNavigation } from 'next-intl/navigation'
import { routing } from './routing'
export const {Link, redirect, usePathname, useRouter} =
createNavigation(routing);
export const { Link, redirect, usePathname, useRouter } = createNavigation(routing)

View File

@@ -1,15 +1,15 @@
import {getRequestConfig} from 'next-intl/server';
import {routing} from './routing';
export default getRequestConfig(async ({requestLocale}) => {
let locale = await requestLocale;
import { getRequestConfig } from 'next-intl/server'
import { routing } from './routing'
export default getRequestConfig(async ({ requestLocale }) => {
let locale = await requestLocale
if (!locale || !routing.locales.includes(locale as any)) {
locale = routing.defaultLocale;
locale = routing.defaultLocale
}
return {
locale,
messages: (await import(`../../messages/${locale}.json`)).default
};
});
messages: (await import(`../../messages/${locale}.json`)).default,
}
})

View File

@@ -1,4 +1,4 @@
import {defineRouting} from 'next-intl/routing';
import { defineRouting } from 'next-intl/routing'
export const routing = defineRouting({
locales: ['en', 'ro'],
@@ -6,8 +6,8 @@ export const routing = defineRouting({
localePrefix: 'always',
localeNames: {
en: 'English',
ro: 'Română'
}
} as any);
ro: 'Română',
},
} as any)
export type Locale = (typeof routing.locales)[number];
export type Locale = (typeof routing.locales)[number]