From b56df396bfe8e92edc7071627bee57f96a2be179 Mon Sep 17 00:00:00 2001 From: Arnaud AMBROSELLI Date: Mon, 7 Aug 2023 16:28:30 +0200 Subject: [PATCH] fix: split quickAccessItems + a propos --- src/app/(la-fabrique)/{about => a-propos}/page.tsx | 0 src/components/Footer.tsx | 3 ++- src/components/Header.tsx | 2 +- src/utils/navigationItems.ts | 2 +- src/utils/quickAccessItems.ts | 13 +++++++++++++ 5 files changed, 17 insertions(+), 3 deletions(-) rename src/app/(la-fabrique)/{about => a-propos}/page.tsx (100%) create mode 100644 src/utils/quickAccessItems.ts diff --git a/src/app/(la-fabrique)/about/page.tsx b/src/app/(la-fabrique)/a-propos/page.tsx similarity index 100% rename from src/app/(la-fabrique)/about/page.tsx rename to src/app/(la-fabrique)/a-propos/page.tsx diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 089cbae81..623f8c43c 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -3,7 +3,8 @@ import { type FooterProps, } from "@codegouvfr/react-dsfr/Footer" -import { navigationItems, quickAccessItems } from "@/utils/navigationItems" +import { navigationItems } from "@/utils/navigationItems" +import { quickAccessItems } from "@/utils/quickAccessItems" const otherLinks: FooterProps.LinkList.Column = { categoryName: "Autres", diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 0410ee7c9..9f1f321e2 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,5 +1,5 @@ import { Header as DSFRHeader } from "@codegouvfr/react-dsfr/Header" -import { quickAccessItems } from "@/utils/navigationItems" +import { quickAccessItems } from "@/utils/quickAccessItems" import Navigation from "./Navigation" export default function Header() { diff --git a/src/utils/navigationItems.ts b/src/utils/navigationItems.ts index 1766b38bd..85aca0721 100644 --- a/src/utils/navigationItems.ts +++ b/src/utils/navigationItems.ts @@ -39,7 +39,7 @@ const navigationItems: MainNavigationProps.Item[] = [ menuLinks: [ { linkProps: { - href: "/about", + href: "/a-propos", target: "_self", }, text: "À propos", diff --git a/src/utils/quickAccessItems.ts b/src/utils/quickAccessItems.ts new file mode 100644 index 000000000..8468893f6 --- /dev/null +++ b/src/utils/quickAccessItems.ts @@ -0,0 +1,13 @@ +import { type HeaderProps } from "@codegouvfr/react-dsfr/Header" + +const quickAccessItems: HeaderProps.QuickAccessItem[] = [ + { + iconId: "fr-icon-file-text-line", + linkProps: { + href: "/documentation", + }, + text: "Documentation", + }, +] + +export { quickAccessItems }