diff --git a/src/components/marketing/landing/page-switcher/index.tsx b/src/components/marketing/landing/page-switcher/index.tsx index 7e28ef5fd..9dfd345a9 100644 --- a/src/components/marketing/landing/page-switcher/index.tsx +++ b/src/components/marketing/landing/page-switcher/index.tsx @@ -1,32 +1,53 @@ "use client"; -import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; import Routes from "@/constants/routes"; +import { useRouter, usePathname } from "next/navigation"; import Link from "next/link"; -import { usePathname } from "next/navigation"; import React from "react"; const PageSwitcher: React.FC = () => { const pathname = usePathname(); + const router = useRouter(); + + const handleTabChange = (value: string) => { + router.push(value === "customer" + ? Routes.landing.customer + : Routes.landing.visitor); + }; return (
- - - + + {/* + Customer tab trigger: + - value must match the TabsContent to show + - id and aria-controls for accessibility + */} + + Je suis un potentiel client - - + + - - Je suis un simple visiteur - + + + Je suis un simple visiteur + + + {/* + Corresponding content panels for each tab. + They are empty since actual content is rendered elsewhere. + */} + +
);