mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-11-18 07:22:06 +00:00
fix dead code with knip upgrade TS to v6 and fix linting errors auto apply oxfmt rules fix linting errors - unused deps etc ignore file remove all ignored files in knip add knip - dead code analysis tool swap prettier and eslint of oxfmt and oxlint fix: fix map rendering in react strict mode fix: headlessUI float replace fix: disable Matomo if not URL and SITE ID exist upgrade: 1st pass upgrade to Next.js v16 deps: upgrade react to v19
65 lines
1.3 KiB
TypeScript
65 lines
1.3 KiB
TypeScript
import { createNavigation } from "next-intl/navigation";
|
|
import { defineRouting } from "next-intl/routing";
|
|
|
|
export const routing = defineRouting({
|
|
locales: ["fr", "en"],
|
|
defaultLocale: "fr",
|
|
localePrefix: "as-needed",
|
|
|
|
pathnames: {
|
|
"/": "/",
|
|
"/clubs": "/clubs",
|
|
"/elo": "/elo",
|
|
|
|
"/tournaments": {
|
|
fr: "/tournois",
|
|
en: "/tournaments",
|
|
},
|
|
|
|
"/zones": {
|
|
fr: "/regions",
|
|
en: "/zones",
|
|
},
|
|
|
|
"/zones/create": {
|
|
fr: "/regions/creer",
|
|
en: "/zones/create",
|
|
},
|
|
|
|
"/zones/edit/[id]": {
|
|
fr: "/regions/modifier/[id]",
|
|
en: "/zones/edit/[id]",
|
|
},
|
|
|
|
"/add-tournament": {
|
|
fr: "/ajouter-un-tournoi",
|
|
en: "/add-tournament",
|
|
},
|
|
|
|
"/add-club": {
|
|
fr: "/ajouter-un-club",
|
|
en: "/add-club",
|
|
},
|
|
|
|
"/contact-us": {
|
|
fr: "/contactez-nous",
|
|
en: "/contact-us",
|
|
},
|
|
|
|
"/delete-account": {
|
|
fr: "/supprimer-compte",
|
|
en: "/delete-account",
|
|
},
|
|
|
|
"/privacy": {
|
|
fr: "/politique-de-confidentialite",
|
|
en: "/privacy",
|
|
},
|
|
},
|
|
});
|
|
|
|
export type Pathnames = keyof typeof routing.pathnames;
|
|
export type Locale = (typeof routing.locales)[number];
|
|
|
|
export const { Link, usePathname, useRouter, getPathname } = createNavigation(routing);
|