-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookingDisplay.js
45 lines (40 loc) · 1.26 KB
/
bookingDisplay.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import React from 'react';
const ViewBooking = (props) => {
const renderTable = ({orderData}) => {
if(orderData){
return orderData.map((item) => {
return(
<tr>
<td>{item._id}</td>
<td>{item.rest_id}</td>
<td>{item.name}</td>
<td>{item.phone}</td>
<td>{item.address}</td>
<td>{item.person}</td>
</tr>
)
})
}
}
return(
<div className="container">
<center><h1>Order Details</h1></center>
<table className="table table-responsive">
<thead>
<tr>
<th>Order ID</th>
<th>Restaurant Name</th>
<th>Name</th>
<th>Phone</th>
<th>Address</th>
<th>No. Person</th>
</tr>
</thead>
<tbody>
{renderTable(props)}
</tbody>
</table>
</div>
)
}
export default ViewBooking;