diff --git a/src/App.js b/src/App.js index c6d308e..6248934 100644 --- a/src/App.js +++ b/src/App.js @@ -22,6 +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" @@ -142,6 +143,7 @@ const readData = async () => { } /> } /> } /> + } /> diff --git a/src/components/ItemImage.js b/src/components/ItemImage.js index ba121ef..1fc9808 100644 --- a/src/components/ItemImage.js +++ b/src/components/ItemImage.js @@ -29,7 +29,7 @@ export function ItemImage ( props ) { } else { return ( - + ) } } \ No newline at end of file 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 04596cc..da2ab67 100644 --- a/src/pages/Home.js +++ b/src/pages/Home.js @@ -2,8 +2,6 @@ import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; import Container from "react-bootstrap/Container"; import Card from "react-bootstrap/Card"; - - import { useState, useEffect, useContext } from "react" import { ItemImage } from "../components/ItemImage" @@ -18,11 +16,15 @@ export function Home(props) { const ItemCards = movies.map( ( movie, itemkey ) => { + const itemLink = `/detail/${movie.id}` return( - - + + + + + { movie.movie_title } { movie.title }