Download IMDB-clone-react-redux/src/components/elements/Actor/Actor.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 622 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/IMDB-clone-react-redux/src/components/elements/Actor/Actor.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/IMDB-clone-react-redux/src/components/elements/Actor/Actor.js
-
curl -L -o Actor.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/IMDB-clone-react-redux/src/components/elements/Actor/Actor.js
622 Bytes
| import React from 'react'; | |
| import { IMAGE_BASE_URL } from '../../../config'; | |
| import PropTypes from 'prop-types'; | |
| import './Actor.css'; | |
| const Actor = ({ actor }) => { | |
| const POSTER_SIZE = "w154"; | |
| return ( | |
| <div className="rmdb-actor"> | |
| <img | |
| src={actor.profile_path ? `${IMAGE_BASE_URL}${POSTER_SIZE}${actor.profile_path}` : './images/no_image.jpg'} | |
| alt="actorthumb" | |
| /> | |
| <span className="rmdb-actor-name">{actor.name}</span> | |
| <span className="rmdb-actor-character">{actor.character}</span> | |
| </div> | |
| ) | |
| } | |
| Actor.propTypes = { | |
| actor: PropTypes.object | |
| } | |
| export default Actor; |