Prvotní nástřel fungující aplikace
This commit is contained in:
21
client/src/components/OrderList.tsx
Normal file
21
client/src/components/OrderList.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Table } from "react-bootstrap";
|
||||
import { Order } from "../Types";
|
||||
|
||||
export default function OrderList({ orders }: { orders: Order[] }) {
|
||||
return <Table striped bordered hover>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pizza</th>
|
||||
<th>Jméno</th>
|
||||
<th>Cena (Kč)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{orders.map(order => <tr>
|
||||
<td>{order.pizzaList[0].name}, {order.pizzaList[0].size}</td>
|
||||
<td>{order.customer}</td>
|
||||
<td>{order.totalPrice}</td>
|
||||
</tr>)}
|
||||
</tbody>
|
||||
</Table>
|
||||
}
|
||||
Reference in New Issue
Block a user