doc: create RatedCards function
This commit is contained in:
1 parent
9c3dd41df5
commit
3137c48e52
1 file changed
+21
@@ -0,0 +1,21 @@
|
||||
import { Typography, Box } from '@mui/material';
|
||||
|
||||
import useStyles from './styles';
|
||||
import { Movie } from '../index';
|
||||
|
||||
function RatedCards({ title, movies }) {
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Typography variant="h5" gutterBottom>{title}</Typography>
|
||||
<Box display="flex" flexWrap="wrap" className={classes.container}>
|
||||
{movies?.results.map((movie, i) => (
|
||||
<Movie key={movie.id} movie={movie} i={i} />
|
||||
))}
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
export default RatedCards;
|
||||
Reference in new issue
Block a user