-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnavigation.ts
More file actions
61 lines (56 loc) · 1.57 KB
/
navigation.ts
File metadata and controls
61 lines (56 loc) · 1.57 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { createLocalizedPathnamesNavigation, createSharedPathnamesNavigation, Pathnames } from 'next-intl/navigation';
export const locales = ['en', 'fr', 'nl'] as const;
export const pathnames = {
'/': '/',
'/annonce': {
en: '/ad',
fr: '/annonce',
nl: '/annonce',
},
'/annonce/publier': {
en: '/ad/publish',
fr: '/annonce/publier',
nl: '/ad/publiceer',
},
'/annonce/[id]': {
en: '/ad/[id]',
fr: '/annonce/[id]',
nl: '/ad/[id]',
},
'/publier': {
en: '/publish',
fr: '/publier',
nl: '/publiceer',
},
'/contact': {
en: '/contact',
fr: '/contact',
nl: '/contact',
},
'/login': {
en: '/login',
fr: '/connexion',
nl: '/inloggen',
},
'/dashboard/job-listing': {
en: '/dashboard/job-listing',
fr: '/tableau-de-/bord/listing-d-emploi',
nl: '/dashboard/job-listing',
},
'/dashboard/job-listing/republish/[id]': {
en: '/dashboard/job-listing/republish/[id]',
fr: '/tableau-de-bord/listing-d-emploi/republier[id]',
nl: '/dashboard/job-listing/herpubliceren/[id]',
},
'/dashboard/job-listing/edit/[id]': {
en: '/dashboard/job-listing/edit/[id]',
fr: '/tableau-de-bord/listing-d-emploi/modifier/[id]',
nl: '/dashboard/job-listing/bewerken/[id]',
},
} satisfies Pathnames<typeof locales>;
export type AppPathnames = keyof typeof pathnames;
export const { Link, redirect, usePathname, useRouter } = createLocalizedPathnamesNavigation({
locales,
pathnames,
});
// export const { Link, redirect, usePathname, useRouter } = createSharedPathnamesNavigation({ locales });