import { Link } from '@tanstack/react-router' import type { CustomerOrderSummary } from '#/domain/ordering.ts' import { formatPrice } from '#/lib/format.ts' import styles from './OrdersListView.module.scss' type OrdersListViewProps = { orders: Array } const OrdersIcon = () => ( ) const formatItems = (items: CustomerOrderSummary['items']) => items .map(({ menuItemName, quantity }) => quantity > 1 ? `${quantity}× ${menuItemName}` : menuItemName, ) .join(', ') export const OrdersListView = ({ orders }: OrdersListViewProps) => (

Your orders

{orders.length === 0 ? (

No orders yet

Your placed orders will show up here.

Browse the menu
) : ( )}
)