bober-bbq-bot/webapp/src/components/BottomNav.tsx
byrsapty 0eabebaca3 Initial commit: Bober BBQ Telegram bot + backend + admin + Mini App
Flask API/admin backend, aiogram bot with delivery/pickup FSM flows,
monobank payment integration, and a Vite/React Telegram Mini App for
menu browsing and cart management.
2026-08-08 15:50:50 +03:00

27 lines
828 B
TypeScript

export type Tab = "menu" | "cart" | "contacts";
interface Props {
active: Tab;
cartCount: number;
onChange: (tab: Tab) => void;
}
const TABS: { id: Tab; icon: string; label: string }[] = [
{ id: "menu", icon: "🍽", label: "Меню" },
{ id: "cart", icon: "🛒", label: "Кошик" },
{ id: "contacts", icon: "📞", label: "Контакти" },
];
export function BottomNav({ active, cartCount, onChange }: Props) {
return (
<nav className="bottom-nav">
{TABS.map((tab) => (
<button key={tab.id} className={active === tab.id ? "active" : ""} onClick={() => onChange(tab.id)}>
<span className="icon">{tab.icon}</span>
{tab.label}
{tab.id === "cart" && cartCount > 0 && <span className="badge">{cartCount}</span>}
</button>
))}
</nav>
);
}