mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
Code tidy
This commit is contained in:
@@ -6,6 +6,12 @@ import Hamburger from "./Hamburger";
|
|||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
const t = useTranslations("Nav");
|
const t = useTranslations("Nav");
|
||||||
|
|
||||||
|
const links = [
|
||||||
|
{ title: t("tournaments"), route: "/tournois" },
|
||||||
|
{ title: t("about"), route: "/qui-sommes-nous" },
|
||||||
|
{ title: t("contact"), route: "/contactez-nous" },
|
||||||
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav
|
<nav
|
||||||
className="relative mt-0 h-16 w-full overflow-x-clip border-b-[1px] bg-white px-5 dark:border-gray-700 dark:bg-gray-800"
|
className="relative mt-0 h-16 w-full overflow-x-clip border-b-[1px] bg-white px-5 dark:border-gray-700 dark:bg-gray-800"
|
||||||
@@ -29,30 +35,16 @@ export default function Navbar() {
|
|||||||
data-test="desktop-menu"
|
data-test="desktop-menu"
|
||||||
>
|
>
|
||||||
<ul className="list-reset flex h-full flex-1 items-center justify-around text-gray-900 no-underline dark:text-white md:flex-none">
|
<ul className="list-reset flex h-full flex-1 items-center justify-around text-gray-900 no-underline dark:text-white md:flex-none">
|
||||||
<li className="mr-10 h-full">
|
{links.map(({ title, route }) => (
|
||||||
<Link
|
<li key={route} className="mr-10 h-full">
|
||||||
className="inline-flex h-full items-center border-b-4 border-t-4 border-transparent transition-all duration-300 ease-in-out hover:border-b-teal-600"
|
<Link
|
||||||
href="/tournois"
|
className="inline-flex h-full items-center border-b-4 border-t-4 border-transparent transition-all duration-300 ease-in-out hover:border-b-teal-600"
|
||||||
>
|
href={route}
|
||||||
{t("tournaments")}
|
>
|
||||||
</Link>
|
{title}
|
||||||
</li>
|
</Link>
|
||||||
<li className="mr-10 h-full">
|
</li>
|
||||||
<Link
|
))}
|
||||||
className="inline-flex h-full items-center border-b-4 border-t-4 border-transparent transition-all duration-300 ease-in-out hover:border-b-teal-600"
|
|
||||||
href="/qui-sommes-nous"
|
|
||||||
>
|
|
||||||
{t("about")}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="mr-10 h-full">
|
|
||||||
<Link
|
|
||||||
className="inline-flex h-full items-center border-b-4 border-t-4 border-transparent transition-all duration-300 ease-in-out hover:border-b-teal-600"
|
|
||||||
href="/contactez-nous"
|
|
||||||
>
|
|
||||||
{t("contact")}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { NextIntlClientProvider, AbstractIntlMessages } from "next-intl";
|
import { NextIntlClientProvider, AbstractIntlMessages } from "next-intl";
|
||||||
import { ReactNode } from "react";
|
import { ReactNode } from "react";
|
||||||
|
|
||||||
import "@/app/globals.css";
|
import "@/css/globals.css";
|
||||||
|
|
||||||
import Navbar from "./Navbar";
|
import Navbar from "./Navbar";
|
||||||
import Footer from "./Footer";
|
import Footer from "./Footer";
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import { getTranslator } from "next-intl/server";
|
|||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { ReactNode } from "react";
|
import { ReactNode } from "react";
|
||||||
|
|
||||||
import "@/app/globals.css";
|
import "@/css/globals.css";
|
||||||
|
|
||||||
import Providers from "./providers";
|
import Providers from "./providers";
|
||||||
import TestableLayout from "./components/TestableLayout";
|
import TestableLayout from "./components/TestableLayout";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user