import React from "react"; import PropTypes from "prop-types"; import { TorrentsStat } from "./torrentsStat"; export const Stat = ({ name, count, torrentCount, torrentCountById }) => (

{name} {count}

); Stat.propTypes = { name: PropTypes.string.isRequired, count: PropTypes.number.isRequired, torrentCount: PropTypes.number.isRequired, torrentCountById: PropTypes.number.isRequired, }; Stat.defaultProps = { name: "", count: 0, torrentCount: 0, torrentCountById: 0, };