diff --git a/src/App.js b/src/App.js index 1e4acac..990deba 100644 --- a/src/App.js +++ b/src/App.js @@ -22,7 +22,7 @@ import { Contact } from "./pages/Contact" import { Signup } from "./pages/Signup" import { Signout } from "./pages/Signout" import { Signin } from "./pages/Signin" - +import { Detail } from "./pages/Detail"; // contexts import { AuthContext } from "./contexts/AuthContext" import { StorageContext } from "./contexts/StorageContext"; @@ -141,6 +141,7 @@ const readData = async () => { } /> } /> } /> + } /> diff --git a/src/pages/Detail.js b/src/pages/Detail.js new file mode 100644 index 0000000..b19d52c --- /dev/null +++ b/src/pages/Detail.js @@ -0,0 +1,22 @@ +import Row from 'react-bootstrap/Row'; +import Col from 'react-bootstrap/Col'; +import Container from "react-bootstrap/Container"; + +import { useParams } from 'react-router-dom'; + +export function Detail(props) { + let { id } = useParams(); + return( + + + +

Image

+ + +

Details

+

{id}

+ +
+
+ ) +} \ No newline at end of file diff --git a/src/pages/Home.js b/src/pages/Home.js index 469ffb0..58c23e8 100644 --- a/src/pages/Home.js +++ b/src/pages/Home.js @@ -16,9 +16,12 @@ export function Home(props) { const ItemCards = books.map( ( book, itemkey ) => { + const itemLink = `/detail/${book.id}` return( - - + + + + { book.book_title }