File size: 622 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
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; |