-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavigation.ts
29 lines (24 loc) · 1.18 KB
/
navigation.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import {
createLocalizedPathnamesNavigation,
Pathnames
} from 'next-intl/navigation';
export const locales = ['fr', 'en'] as const;
export const localePrefix = 'always'; // Default
// The `pathnames` object holds pairs of internal
// and external paths, separated by locale.
export const pathnames = {
// If all locales use the same pathname, a
// single external path can be provided.
'/': '/',
'/#projects-ancor': '/#projects-ancor',
'/about': '/about',
"#": "#",
'/project/[...slug]': '/project/[...slug]',
'https://twitter.com/Kc_Thomaaas': 'https://twitter.com/Kc_Thomaaas',
'https://www.behance.net/thomasremblier': 'https://www.behance.net/thomasremblier',
'https://www.linkedin.com/in/thomas-remblier-a9805a220/': 'https://www.linkedin.com/in/thomas-remblier-a9805a220/',
'https://github.com/thomasrembl': 'https://github.com/thomasrembl',
'https://www.instagram.com/remblier.psd/': 'https://www.instagram.com/remblier.psd/',
} satisfies Pathnames<typeof locales>;
export const {Link, redirect, usePathname, useRouter, getPathname} =
createLocalizedPathnamesNavigation({locales, localePrefix, pathnames});