From 9687230690405f487a30b24b17e9d55afb94173e Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Sat, 3 Sep 2022 12:38:53 -0700 Subject: [PATCH] doc: create MovieList function --- src/components/MovieList/MovieList.jsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/components/MovieList/MovieList.jsx b/src/components/MovieList/MovieList.jsx index e69de29..c4f5dda 100644 --- a/src/components/MovieList/MovieList.jsx +++ b/src/components/MovieList/MovieList.jsx @@ -0,0 +1,19 @@ +import { Grid } from '@mui/material'; + +import useStyles from './styles'; +import { Movie } from '../index'; + +function MovieList({ movies, numberOfMovies, excludeFirst }) { + const classes = useStyles(); + const startFrom = excludeFirst ? 1 : 0; + + return ( + + {movies.results.slice(startFrom, numberOfMovies).map((movie, i) => ( + + ))} + + ); +} + +export default MovieList;