Download Netflix-Clone/src/Components/CollectionGridItem/CollectionGridItem.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/CollectionGridItem/CollectionGridItem.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/CollectionGridItem/CollectionGridItem.js
-
curl -L -o CollectionGridItem.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/CollectionGridItem/CollectionGridItem.js
1.05 kB
| import React from "react"; | |
| import { IMAGE_BASE_URL, BACKDROP_SIZE } from "../../Config/config"; | |
| import "./CollectionGridItem.scss"; | |
| import AddToList from "../AddToList/AddToList"; | |
| const CollectionGridItem = ({ item, listItems, addItem }) => { | |
| const { title, overview, backdrop_path, poster_path, name } = item; | |
| return ( | |
| <div className="grid-item"> | |
| <img | |
| src={`${IMAGE_BASE_URL}${BACKDROP_SIZE}${backdrop_path}`} | |
| alt="movie" | |
| className="grid-item__img" | |
| /> | |
| <img | |
| src={`${IMAGE_BASE_URL}${BACKDROP_SIZE}${poster_path}`} | |
| alt="movie" | |
| className="grid-item__img grid-item__mobile-img" | |
| /> | |
| <div className={`${title ? "grid-item__movie-text" : "grid-item__tv-text"}`}> | |
| <h1 className="grid-item__title">{title}</h1> | |
| <h1 className="grid-item__title">{name}</h1> | |
| <span className="grid-item__overview">{overview}</span> | |
| <AddToList item={item} /> | |
| </div> | |
| </div> | |
| ); | |
| }; | |
| export default CollectionGridItem; | |