From 93c6bc7e80fa4917cb8d49a05620d46578f3859b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CHenry-Hiles=E2=80=9D?= <“henry@henryhiles.com”> Date: Wed, 2 Nov 2022 11:15:42 -0400 Subject: [PATCH] Added ratings page --- src/App.jsx | 8 +++++-- src/components/Card.jsx | 31 +++++++++++++++----------- src/components/CardList.jsx | 12 ---------- src/components/Rate.jsx | 6 +++-- src/components/TopBar.jsx | 18 +++++++-------- src/index.css | 2 +- src/pages/Actor.jsx | 3 ++- src/pages/Home.jsx | 9 +++++++- src/pages/Movie.jsx | 4 ++++ src/pages/Ratings.jsx | 29 ++++++++++++++++++++++++ src/styles/Actor.module.css | 4 ++++ src/{App.css => styles/App.module.css} | 0 src/styles/Home.module.css | 12 ++++++++++ src/styles/Movie.module.css | 4 ++++ src/styles/Ratings.module.css | 19 ++++++++++++++++ src/styles/TopBar.module.css | 24 +++++++------------- 16 files changed, 127 insertions(+), 58 deletions(-) delete mode 100644 src/components/CardList.jsx create mode 100644 src/pages/Ratings.jsx rename src/{App.css => styles/App.module.css} (100%) create mode 100644 src/styles/Ratings.module.css diff --git a/src/App.jsx b/src/App.jsx index eeec100..e831b61 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,15 +1,19 @@ import { Routes, Route } from "react-router-dom" -import "./App.css" import Home from "pages/Home" import Movie from "pages/Movie" import Actor from "pages/Actor" +import Ratings from "pages/Ratings" +import styles from "styles/App.module.css" +import TopBar from "components/TopBar" const App = () => ( -
{movie.title} - {movie.year}
-- {movie.averageVote}{" "} - -
+ {movie.rating ? ( ++ Average rating: {movie.averageVote}{" "} + +
+ )}{movie.overview}