2023-12-29 15:31:00 +00:00
|
|
|
import { createLocalizedPathnamesNavigation, Pathnames } from 'next-intl/navigation';
|
2023-12-21 21:22:13 +00:00
|
|
|
import { ALLOWED_LOCALES, LOCALE_PREFIX } from './constants/locale';
|
|
|
|
|
|
|
|
export const { Link, redirect, usePathname, useRouter } =
|
|
|
|
createLocalizedPathnamesNavigation({
|
|
|
|
locales: ALLOWED_LOCALES,
|
|
|
|
pathnames: {
|
2023-12-29 15:31:00 +00:00
|
|
|
'/': '/',
|
2024-01-03 13:56:57 +00:00
|
|
|
// '/experts': '/experts',
|
|
|
|
// '/experts/[expertId]': '/experts/[expertId]',
|
|
|
|
// '/news': '/news',
|
|
|
|
// '/privacy-policy': '/privacy-policy',
|
|
|
|
// '/[userId]': '/[userId]',
|
|
|
|
// '/[userId]/[...slug]': '/[userId]/[...slug]',
|
2023-12-29 15:31:00 +00:00
|
|
|
} satisfies Pathnames<typeof ALLOWED_LOCALES>,
|
2023-12-21 21:22:13 +00:00
|
|
|
localePrefix: LOCALE_PREFIX
|
|
|
|
});
|