Grégoire Delattre d585a59c83 Download movie fanart and better torrent list on mobile
Show the thumb on wide screens and the fanart on small screens.
2021-08-22 11:33:36 -10:00

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: "",
};