Merge pull request #2505 from paulkaplan/remove-approx-liking

Remove approx liking/favoriting format
This commit is contained in:
Paul Kaplan 2018-12-18 11:40:07 -05:00 committed by GitHub
commit f0b37134ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -39,7 +39,6 @@
}, },
"devDependencies": { "devDependencies": {
"ajv": "6.4.0", "ajv": "6.4.0",
"approximate-number": "2.0.0",
"async": "1.5.2", "async": "1.5.2",
"autoprefixer": "6.3.6", "autoprefixer": "6.3.6",
"babel-cli": "6.26.0", "babel-cli": "6.26.0",

View file

@ -2,7 +2,6 @@ const PropTypes = require('prop-types');
const React = require('react'); const React = require('react');
const FlexRow = require('../../components/flex-row/flex-row.jsx'); const FlexRow = require('../../components/flex-row/flex-row.jsx');
const classNames = require('classnames'); const classNames = require('classnames');
const approx = require('approximate-number');
const CappedNumber = require('../../components/cappednumber/cappednumber.jsx'); const CappedNumber = require('../../components/cappednumber/cappednumber.jsx');
const projectShape = require('./projectshape.jsx').projectShape; const projectShape = require('./projectshape.jsx').projectShape;
@ -16,20 +15,20 @@ const Stats = props => (
key="loves" key="loves"
onClick={props.onLoveClicked} onClick={props.onLoveClicked}
> >
{approx(Math.max(0, props.loveCount), {decimal: false})} {Math.max(0, props.loveCount)}
</div> </div>
<div <div
className={classNames('project-favorites', {favorited: props.faved})} className={classNames('project-favorites', {favorited: props.faved})}
key="favorites" key="favorites"
onClick={props.onFavoriteClicked} onClick={props.onFavoriteClicked}
> >
{approx(Math.max(0, props.favoriteCount), {decimal: false})} {Math.max(0, props.favoriteCount)}
</div> </div>
<div <div
className="project-remixes" className="project-remixes"
key="remixes" key="remixes"
> >
{approx(props.projectInfo.stats.remixes, {decimal: false})} {props.projectInfo.stats.remixes}
</div> </div>
<div <div
className="project-views" className="project-views"