From 79dc26141a4ce72921bc50865bdb9d50e84512df Mon Sep 17 00:00:00 2001 From: lewypopescu Date: Mon, 5 Aug 2024 16:24:43 +0200 Subject: [PATCH] movie details better --- src/components/MovieDetails/MovieDetails.jsx | 22 ++++--- .../MovieDetails/MovieDetails.module.css | 62 ++++++++++++++----- 2 files changed, 59 insertions(+), 25 deletions(-) diff --git a/src/components/MovieDetails/MovieDetails.jsx b/src/components/MovieDetails/MovieDetails.jsx index 46a6136..b296936 100644 --- a/src/components/MovieDetails/MovieDetails.jsx +++ b/src/components/MovieDetails/MovieDetails.jsx @@ -5,7 +5,6 @@ import styles from './MovieDetails.module.css'; const MovieDetails = () => { const { movieId } = useParams(); - const [movie, setMovie] = useState(null); useEffect(() => { @@ -32,17 +31,20 @@ const MovieDetails = () => { alt={movie.title} className={styles.poster} /> -

+

{movie.title} ({movie.release_date.split('-')[0]})

-

User Score: {movie.vote_average * 10}%

-

Overview

-

{movie.overview}

-

Genres

-

{movie.genres.map(genre => genre.name).join(', ')}

- -

Additional information

-