import React from "react" import PropTypes from "prop-types" import { Map } from "immutable" import EmptyImg from "../../../img/noimage.png" const Poster = (props) => { const className = props.selected ? "border-primary thumbnail-selected" : "border-secondary"; const src = (props.data.get("poster_url") === "") ? EmptyImg : props.data.get("poster_url"); return ( ); } Poster.propTypes = { data: PropTypes.instanceOf(Map), selected: PropTypes.bool, onClick: PropTypes.func, onDoubleClick: PropTypes.func, }; export default Poster;