diff --git a/app/[locale]/components/header.tsx b/app/[locale]/components/navigation.tsx similarity index 86% rename from app/[locale]/components/header.tsx rename to app/[locale]/components/navigation.tsx index b848240..49e974a 100644 --- a/app/[locale]/components/header.tsx +++ b/app/[locale]/components/navigation.tsx @@ -6,17 +6,24 @@ import Link from "next/link"; import Image from "next/image"; -import { Bell, User, Files, Palette, Cctv, Bug } from "lucide-react"; +import { Bug, + Bell, + User, + Cctv, + Files, + Palette, + Settings, + LayoutDashboard } from "lucide-react"; -import GitHubDark from "../../../public/assets/images/github-dark.png"; -import GitHubLight from "../../../public/assets/images/github-light.png"; -import { buttonVariants } from "./ui/button"; +import GitHubDark from "@/public/assets/images/github-dark.png"; +import GitHubLight from "@/public/assets/images/github-light.png"; import { NavigationMenu, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuContent, - NavigationMenuTrigger } from "./ui/navigation-menu"; + NavigationMenuTrigger, + navigationMenuTriggerStyle } from "./ui/navigation-menu"; // Déclaration des routes de paramétrage. export const routes: { @@ -100,18 +107,17 @@ export default function Header( { { // Affichage du rendu HTML du composant. return ( - + {/* Page d'accueil */} - Tableau de bord + +

Tableau de bord

@@ -122,7 +128,8 @@ export default function Header( { id="settings" aria-controls="settings" > - Paramètres + +

Paramètres

diff --git a/app/[locale]/components/user-menu.tsx b/app/[locale]/components/user-menu.tsx index 09910f0..68de01a 100644 --- a/app/[locale]/components/user-menu.tsx +++ b/app/[locale]/components/user-menu.tsx @@ -215,7 +215,7 @@ export default function UserMenu( { session }: { session: Session } ) // Affichage du rendu HTML du composant. return ( - + ); } \ No newline at end of file diff --git a/app/[locale]/dashboard/page.tsx b/app/[locale]/dashboard/page.tsx index 3ea9b89..f5ade9b 100644 --- a/app/[locale]/dashboard/page.tsx +++ b/app/[locale]/dashboard/page.tsx @@ -20,9 +20,9 @@ import { generateMetadata } from "../layout"; // Importation des composants. import { Separator } from "../components/ui/separator"; -const Header = lazy( () => import( "../components/header" ) ); const UserMenu = lazy( () => import( "../components/user-menu" ) ); const DataTable = lazy( () => import( "./components/data-table" ) ); +const Navigation = lazy( () => import( "../components/navigation" ) ); // Déclaration des propriétés de la page. export const metadata: Metadata = { @@ -135,19 +135,17 @@ export default async function Page( { // Affichage du rendu HTML de la page. return ( <> -
-
- {/* Titre du site */} -

- 💾 {meta.title as string} -

- - {/* Éléments de navigation */} -
-
+
+ {/* Titre du site */} +

+ 💾 {meta.title as string} +

+ + {/* Navigation du site */} + {/* Menu utilisateur */} diff --git a/app/[locale]/legal/layout.tsx b/app/[locale]/legal/layout.tsx index d1c04a3..eddb5d1 100644 --- a/app/[locale]/legal/layout.tsx +++ b/app/[locale]/legal/layout.tsx @@ -11,8 +11,8 @@ import { unstable_setRequestLocale } from "next-intl/server"; import { auth } from "@/utilities/next-auth"; import { generateMetadata } from "../layout"; -const Header = lazy( () => import( "../components/header" ) ); const UserMenu = lazy( () => import( "../components/user-menu" ) ); +const Navigation = lazy( () => import( "../components/navigation" ) ); export default async function Layout( { children, @@ -32,24 +32,24 @@ export default async function Layout( { // Affichage du rendu HTML de la page. return ( <> -
-
- {/* Titre du site */} -

- 💾 {meta.title as string} -

- - {/* Éléments de navigation */} - {session && ( -
+ {/* Titre du site */} +

+ 💾 {meta.title as string} +

+ + {session && ( + <> + {/* Navigation du site */} + - )} -
- {/* Menu utilisateur */} - {session && } + {/* Menu utilisateur */} + + + )}
{children} diff --git a/app/[locale]/settings/components/navigation.tsx b/app/[locale]/settings/components/routes.tsx similarity index 90% rename from app/[locale]/settings/components/navigation.tsx rename to app/[locale]/settings/components/routes.tsx index dbbd05e..5c83104 100644 --- a/app/[locale]/settings/components/navigation.tsx +++ b/app/[locale]/settings/components/routes.tsx @@ -1,5 +1,5 @@ // -// Composant de navigation des paramètres. +// Composant des routes vers les paramètres. // "use client"; @@ -9,10 +9,10 @@ import { merge } from "@/utilities/tailwind"; import { Cookie } from "lucide-react"; import { usePathname } from "next/navigation"; -import { routes } from "../../components/header"; +import { routes } from "../../components/navigation"; import { Button, buttonVariants } from "../../components/ui/button"; -export default function Navigation() +export default function Routes() { // Déclaration des variables d'état. const pathname = usePathname(); diff --git a/app/[locale]/settings/layout.tsx b/app/[locale]/settings/layout.tsx index ca21c5a..a66ab8f 100644 --- a/app/[locale]/settings/layout.tsx +++ b/app/[locale]/settings/layout.tsx @@ -16,9 +16,9 @@ import { generateMetadata } from "../layout"; // Importation des composants. import { Separator } from "../components/ui/separator"; -const Header = lazy( () => import( "../components/header" ) ); +const Routes = lazy( () => import( "./components/routes" ) ); const UserMenu = lazy( () => import( "../components/user-menu" ) ); -const Navigation = lazy( () => import( "./components/navigation" ) ); +const Navigation = lazy( () => import( "../components/navigation" ) ); // Déclaration des propriétés de la page. export const metadata: Metadata = { @@ -49,19 +49,17 @@ export default async function Layout( { // Affichage du rendu HTML de la page. return ( <> -
-
- {/* Titre du site */} -

- 💾 {meta.title as string} -

- - {/* Éléments de navigation */} -
-
+
+ {/* Titre du site */} +

+ 💾 {meta.title as string} +

+ + {/* Navigation du site */} + {/* Menu utilisateur */} @@ -83,8 +81,8 @@ export default async function Layout( {
- {/* Navigation latérale */} - + {/* Routes de navigation */} + {/* Contenu principal */}