const PropTypes = require('prop-types'); const React = require('react'); const FlexRow = require('../../components/flex-row/flex-row.jsx'); const classNames = require('classnames'); const approx = require('approximate-number'); const CappedNumber = require('../../components/cappednumber/cappednumber.jsx'); const projectShape = require('./projectshape.jsx').projectShape; require('./stats.scss'); const Stats = props => (
{approx(Math.max(0, props.loveCount), {decimal: false})}
{approx(Math.max(0, props.favoriteCount), {decimal: false})}
{approx(props.projectInfo.stats.remixes, {decimal: false})}
); Stats.propTypes = { faved: PropTypes.bool, favoriteCount: PropTypes.number, loveCount: PropTypes.number, loved: PropTypes.bool, onFavoriteClicked: PropTypes.func, onLoveClicked: PropTypes.func, projectInfo: projectShape }; module.exports = Stats;