-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCheckoutAndReviewBox.tsx
45 lines (38 loc) · 1.63 KB
/
CheckoutAndReviewBox.tsx
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 { Link } from "react-router-dom";
import BookModel from "../../models/BookModel";
export const CheckoutAndReviewBox: React.FC<{ book: BookModel | undefined, mobile: boolean }> = (props) => {
return (
<div className={props.mobile ? 'card d-flex mt-5' : 'card col-3 container d-flex mb-5'}>
<div className='card-body container'>
<div className='mt-3'>
<p>
<b>0/5 </b>
books checked out
</p>
<hr />
{props.book && props.book.copiesAvailable && props.book.copiesAvailable > 0 ?
<h4 className='text-success'>Available</h4> : <h4 className='text-danger'>Wait List</h4>
}
<div className='row'>
<p className='col-6 lead'>
<b>{props.book?.copies} </b>
copies
</p>
<p className='col-6 lead'>
<b>{props.book?.copiesAvailable} </b>
available
</p>
</div>
</div>
<Link to="#" className='btn btn-success btn-lg'>Sign in</Link>
<hr />
<p className='mt-3'>
This number can change until placing order has been complete.
</p>
<p>
Sign in to be able to leave a review.
</p>
</div>
</div>
);
}