mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
Remove approx liking/favoriting format
This commit is contained in:
parent
ad4442a310
commit
d9b30d96d1
2 changed files with 3 additions and 5 deletions
|
@ -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",
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue