Skip to content

Commit

Permalink
chore(survey): add a thousand separator to counts (#24645)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajmajerik authored Aug 28, 2024
1 parent 254faa3 commit 5b77533
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/src/scenes/surveys/surveyViewViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { BindLogic, useActions, useValues } from 'kea'
import { dayjs } from 'lib/dayjs'
import { LemonDivider } from 'lib/lemon-ui/LemonDivider'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
import { humanFriendlyNumber } from 'lib/utils'
import { useEffect, useState } from 'react'
import { insightLogic } from 'scenes/insights/insightLogic'
import { LineGraph } from 'scenes/insights/views/LineGraph/LineGraph'
Expand Down Expand Up @@ -36,7 +37,7 @@ const formatCount = (count: number, total: number): string => {
if ((count / total) * 100 < 3) {
return ''
}
return `${count}`
return `${humanFriendlyNumber(count)}`
}

export function UsersCount({ surveyUserStats }: { surveyUserStats: SurveyUserStats }): JSX.Element {
Expand All @@ -48,12 +49,12 @@ export function UsersCount({ surveyUserStats }: { surveyUserStats: SurveyUserSta
return (
<div className="inline-flex mb-4">
<div>
<div className="text-4xl font-bold">{total}</div>
<div className="text-4xl font-bold">{humanFriendlyNumber(total)}</div>
<div className="font-semibold text-muted-alt">{labelTotal}</div>
</div>
{sent > 0 && (
<div className="ml-10">
<div className="text-4xl font-bold">{sent}</div>
<div className="text-4xl font-bold">{humanFriendlyNumber(sent)}</div>
<div className="font-semibold text-muted-alt">{labelSent}</div>
</div>
)}
Expand Down

0 comments on commit 5b77533

Please sign in to comment.