Add commas to animated count (#125)
This commit is contained in:
parent
c082c06df3
commit
7744edeee8
|
@ -7,7 +7,6 @@ import { VoteType, voteTypes } from './../../constants/voteTypes'
|
||||||
import { CurrentVoting } from '../../models/community'
|
import { CurrentVoting } from '../../models/community'
|
||||||
import { VoteGraphBar } from './VoteGraphBar'
|
import { VoteGraphBar } from './VoteGraphBar'
|
||||||
import { formatTimeLeft } from '../../helpers/fomatTimeLeft'
|
import { formatTimeLeft } from '../../helpers/fomatTimeLeft'
|
||||||
|
|
||||||
export interface VoteChartProps {
|
export interface VoteChartProps {
|
||||||
vote: CurrentVoting
|
vote: CurrentVoting
|
||||||
voteWinner?: number
|
voteWinner?: number
|
||||||
|
@ -51,7 +50,7 @@ export function VoteChart({
|
||||||
<span>
|
<span>
|
||||||
{' '}
|
{' '}
|
||||||
{isAnimation && proposingAmount && selectedVote && selectedVote.type === 0 ? (
|
{isAnimation && proposingAmount && selectedVote && selectedVote.type === 0 ? (
|
||||||
<CountUp end={votesAgainst + proposingAmount} />
|
<CountUp end={votesAgainst + proposingAmount} separator="," />
|
||||||
) : (
|
) : (
|
||||||
addCommas(votesAgainst)
|
addCommas(votesAgainst)
|
||||||
)}{' '}
|
)}{' '}
|
||||||
|
@ -66,7 +65,7 @@ export function VoteChart({
|
||||||
<span>
|
<span>
|
||||||
{' '}
|
{' '}
|
||||||
{isAnimation && proposingAmount && selectedVote && selectedVote.type === 1 ? (
|
{isAnimation && proposingAmount && selectedVote && selectedVote.type === 1 ? (
|
||||||
<CountUp end={votesFor + proposingAmount} />
|
<CountUp end={votesFor + proposingAmount} separator="," />
|
||||||
) : (
|
) : (
|
||||||
addCommas(votesFor)
|
addCommas(votesFor)
|
||||||
)}{' '}
|
)}{' '}
|
||||||
|
|
Loading…
Reference in New Issue