ldc-ovoteam/resources/ts/front/Components/Theme/Header/Header.tsx
Jérémy Munsch cd2d8ed397
refactor(i18n): replace GetTranslation with trans function
- Updated translation utility to improve consistency and reduce redundancy.
- Removed deprecated useTrans hook and related code.
- Introduced a new Zustand store for managing translations and locale settings.
- Cleaned up unused hooks and files related to localization.
2026-10-19 17:43:33 +02:00

47 lines
1.2 KiB
TypeScript

//* THEME
import DesktopNav from "$/uwil/Header/DesktopNav";
import MobileNav from "$/uwil/Header/MobileNav";
import trans from "@/hooks/use-translations";
import { FrontNavLinkProps } from "@/types/front";
import { route } from "ziggy-js";
export default function Header() {
const commitmentLinks = ["made-in-france", "gamme", "expertise"];
const navLinks: FrontNavLinkProps[] = [
{
title: trans(`front.ovoteam_commit`),
href: route(`front.engage`),
children: commitmentLinks.map((com) => {
return {
title: trans(`front.${com}`),
href: route(`front.${com}`),
};
}),
},
{
title: "Recettes",
href: route("front.recipes.index"),
},
{
title: "Produits",
href: route("front.products.index"),
},
{
title: "Nous contacter",
href: route("front.contact-us"),
},
{
title: "Nous rejoindre",
href: "https://recrutement.ldc.fr/fr/annonces?brands=2625",
external: true,
},
];
return (
<header className="bg-background w-full md:container md:mx-auto px-4 md:px-5 lg:pb-5">
<DesktopNav navLinks={navLinks} />
<MobileNav navLinks={navLinks} />
</header>
);
}