diff --git a/src/components/ReviewForm.js b/src/components/ReviewForm.js index 762de59..9999228 100644 --- a/src/components/ReviewForm.js +++ b/src/components/ReviewForm.js @@ -1,29 +1,39 @@ import Form from "react-bootstrap/Form" import Button from "react-bootstrap/Button" +import { AuthContext } from "../contexts/AuthContext" +import { useContext } from "react" + + export function ReviewForm(props) { - return ( -
-

Rewiew this movie

- - Star - - - - - - - - - - Title - - - - Review - - - -
- ) -} \ No newline at end of file + const auth = useContext(AuthContext) + if (auth) { + return ( +
+

Review this movie

+ + Star + + + + + + + + + + Title + + + + Review + + + +
+ ) + } + else { + return null + } +} diff --git a/src/pages/Detail.js b/src/pages/Detail.js index f0f330f..0bc02c2 100644 --- a/src/pages/Detail.js +++ b/src/pages/Detail.js @@ -27,10 +27,10 @@ export function Detail(props) { - + - +

More Information

Synopsis

{movieData.synopsis}

@@ -55,6 +55,6 @@ export function Detail(props) { } else { return null; - - } - } \ No newline at end of file + + } +} \ No newline at end of file