diff --git a/src/components/ReviewForm.js b/src/components/ReviewForm.js index 9999228..36a139c 100644 --- a/src/components/ReviewForm.js +++ b/src/components/ReviewForm.js @@ -2,24 +2,31 @@ import Form from "react-bootstrap/Form" import Button from "react-bootstrap/Button" import { AuthContext } from "../contexts/AuthContext" -import { useContext } from "react" +import { useContext, useState } from "react" +const submitHandler = (event) => { +event.preventDefault() +} export function ReviewForm(props) { const auth = useContext(AuthContext) + const[star, setStar ] = useState() + const[title, setTitle ] = useState() + const[review, setReview ] = useState() if (auth) { return ( -
-

Review this movie

+ +

Review {props.movietitle}

Star - + setStar(evt.target.value) }> + You have given {star} star(s) Title diff --git a/src/pages/Detail.js b/src/pages/Detail.js index 40baa38..167966b 100644 --- a/src/pages/Detail.js +++ b/src/pages/Detail.js @@ -24,7 +24,7 @@ export function Detail(props) { -

{movieData.title}

+

{movieData.movie_title}

@@ -50,7 +50,7 @@ export function Detail(props) { - +