Reorganise code - use src folder

This commit is contained in:
Timothy Armes
2023-10-11 08:45:36 +02:00
committed by Owen Rees
parent 2dc5f477c9
commit b5061b1c78
89 changed files with 70 additions and 69 deletions
+32
View File
@@ -0,0 +1,32 @@
import {
Pathnames,
createLocalizedPathnamesNavigation,
} from "next-intl/navigation";
export const locales = ["fr", "en"] as const;
// The `pathnames` object holds pairs of internal
// and external paths, separated by locale.
export const pathnames = {
"/": "/",
"/clubs": "/clubs",
"/elo": "/elo",
"/tournaments": {
fr: "/tournois",
en: "/tournaments",
},
"/add-tournament": {
fr: "/ajouter-un-tournoi",
en: "/add-tournament",
},
"/contact-us": {
fr: "/contactez-nous",
en: "/contact-us",
},
} satisfies Pathnames<typeof locales>;
export const { Link, redirect, usePathname, useRouter, getPathname } =
createLocalizedPathnamesNavigation({ locales, pathnames });