28 lines
570 B
JavaScript
28 lines
570 B
JavaScript
import React from "react";
|
|
import PropTypes from "prop-types";
|
|
|
|
export const Poster = ({ thumb, fanart }) => {
|
|
if (thumb === "" && fanart === "") {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div className="col-md-2">
|
|
{thumb !== "" && (
|
|
<img className="card-img d-none d-sm-block" src={thumb} />
|
|
)}
|
|
{fanart !== "" && (
|
|
<img className="card-img d-block d-sm-none" src={fanart} />
|
|
)}
|
|
</div>
|
|
);
|
|
};
|
|
Poster.propTypes = {
|
|
thumb: PropTypes.string,
|
|
fanart: PropTypes.string,
|
|
};
|
|
Poster.defaultProps = {
|
|
thumb: "",
|
|
fanart: "",
|
|
};
|