Skip to content
This repository was archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Rename variables in delegateStats
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Jul 24, 2017
1 parent dc3cd2e commit 000e534
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/forging/delegateStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import CircularProgressbar from 'react-circular-progressbar';
import grid from '../../../node_modules/flexboxgrid/dist/flexboxgrid.css';
import style from './forging.css';

const progressCircleCardObjects = [
const progressCircleCardList = [
{
key: 'rate',
label: 'Rank',
textForPercentage: pct => (101 - pct),
percentageTransform: pct => (101 - pct),
textForPercentage: percentage => (101 - percentage),
percentageTransform: percentage => (101 - percentage),
}, {
key: 'productivity',
label: 'Productivity',
Expand All @@ -23,16 +23,16 @@ const identity = x => (x);

const DelegateStats = props => (
<div className={`${grid.row} ${grid['between-xs']}`}>
{progressCircleCardObjects.map(cardObj => (
<div className={grid['col-xs-4']} key={cardObj.key}>
{progressCircleCardList.map(cardItem => (
<div className={grid['col-xs-4']} key={cardItem.key}>
<Card className={style.grayCard}>
<CardText>
<div className={grid['col-xs-12']}>
<div className={`${grid.row} ${grid['between-xs']}`}>
<div className={style.circularProgressTitle}> {cardObj.label} </div>
<div className={style.circularProgressTitle}> {cardItem.label} </div>
<CircularProgressbar
percentage={(cardObj.percentageTransform || identity)(props.delegate[cardObj.key])}
textForPercentage={cardObj.textForPercentage}/>
percentage={(cardItem.percentageTransform || identity)(props.delegate[cardItem.key])}
textForPercentage={cardItem.textForPercentage}/>
</div>
</div>
</CardText>
Expand Down

0 comments on commit 000e534

Please sign in to comment.