'use client'; import type { TabOrder } from '@/lib/api/client'; import { formatCents } from '@/lib/utils'; import { useLang } from '@/lib/i18n'; /** * A tab's drinks per order, as the terminal shows them: "—— 12:32 today ——" above each, e.g. "2× Duvel · €4.00 each * · €8.00". Drinks taken off again show when the order lists them. */ export function TabOrders({ orders }: { orders: TabOrder[] | null | undefined }) { const { t, orderTime } = useLang(); if (!orders) { return

{t('tabs.lines_unknown')}

; } if (orders.length === 0) { return

{t('tabs.lines_empty')}

; } return (
{orders.map((order) => (
{orderTime(order.startedAt)}
))}
); }