diff --git a/src/pages/Detail.js b/src/pages/Detail.js index cb5c668..fbce216 100644 --- a/src/pages/Detail.js +++ b/src/pages/Detail.js @@ -1,33 +1,35 @@ import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; +import Form from 'react-bootstrap/Form'; import Container from "react-bootstrap/Container"; import { useState, useEffect } from 'react'; import { useParams } from 'react-router-dom'; import { ItemImage } from '../components/ItemImage'; +import Button from 'react-bootstrap/Button'; export function Detail(props) { const [bookData, setBookData] = useState() let { id } = useParams(); - useEffect( () => { - if( !bookData ) { - props.handler(id).then( (book) => setBookData(book) ) + useEffect(() => { + if (!bookData) { + props.handler(id).then((book) => setBookData(book)) } }, [id]) - if( bookData ) { - return( + if (bookData) { + return ( -

{bookData.book_title}

+

{bookData.book_title}

- +

More information

@@ -36,14 +38,40 @@ export function Detail(props) {

Author

{bookData.author}

ISBN

-

ISBN10 {bookData.isbn10}

-

ISBN13 {bookData.isbn13}

+

ISBN10: {bookData.isbn10}

+

ISBN13: {bookData.isbn13}

+
+

Review this book

+ + Star + + + + + + + + + + Title + + + + Review + + + +
+ + +
) } else { return null } + } \ No newline at end of file