frontend/app/components/repas/index.tsx
Nathan Lamy 052e59f1ac
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m54s
feat: add menus (repas)
2025-08-24 00:34:09 +02:00

67 lines
1.7 KiB
TypeScript

import { useState } from "react";
import { Tabs, TabsList, tabsStyle, TabsTrigger } from "~/components/ui/tabs";
import BottomNavigation from "~/components/bottom-nav";
import { CalendarCheck, ChefHat } from "lucide-react";
import WIP from "./wip";
import Menus from "./menus";
const tabs = [
{
value: "menu",
label: "Menus",
icon: <ChefHat className="h-4 w-4" />,
content: <Menus />,
},
{
value: "bjrepas",
label: "BJ Repas",
icon: <CalendarCheck className="h-4 w-4" />,
content: <WIP />,
},
];
export default function RepasPage() {
// user / notifications / preferences tabs
const [activeTab, setActiveTab] = useState(tabs[0].value);
return (
<div className="space-y-6 pb-20 md:pb-0">
{/* Tabs */}
<Tabs
defaultValue={tabs[0].value}
value={activeTab}
onValueChange={setActiveTab}
className="max-w-md w-full"
>
<TabsList className="w-full p-0 bg-background justify-start border-b rounded-none">
{tabs.map((tab) => (
<TabsTrigger
key={tab.value}
value={tab.value}
className={tabsStyle}
>
{tab.icon}
{tab.label}
</TabsTrigger>
))}
</TabsList>
</Tabs>
{/* Tab Content */}
<div className="pt-2">
{tabs.map((tab) => (
<div
key={tab.value}
className={`${
activeTab === tab.value ? "block" : "hidden"
} transition-all duration-300`}
>
{tab.content}
</div>
))}
</div>
<BottomNavigation activeId="repas" />
</div>
);
}