diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-01-23 16:01:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-23 16:01:25 +0100 |
commit | a63495230a3a28e022504f36356cd75b17b635ba (patch) | |
tree | 02ee97effb903d57cc8f310b334153749c276795 /app/javascript | |
parent | bddd9ba36d9f4e86e2a4bbea77f967c143afa2cc (diff) |
Change `percent` to `rate` in retention metrics API (#16910)
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/components/admin/Retention.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/components/admin/Retention.js b/app/javascript/mastodon/components/admin/Retention.js index 3a7aaed9d..47c9e7151 100644 --- a/app/javascript/mastodon/components/admin/Retention.js +++ b/app/javascript/mastodon/components/admin/Retention.js @@ -88,7 +88,7 @@ export default class Retention extends React.PureComponent { </td> {data[0].data.slice(1).map((retention, i) => { - const average = data.reduce((sum, cohort, k) => cohort.data[i + 1] ? sum + (cohort.data[i + 1].percent - sum)/(k + 1) : sum, 0); + const average = data.reduce((sum, cohort, k) => cohort.data[i + 1] ? sum + (cohort.data[i + 1].rate - sum)/(k + 1) : sum, 0); return ( <td key={retention.date}> @@ -118,8 +118,8 @@ export default class Retention extends React.PureComponent { {cohort.data.slice(1).map(retention => ( <td key={retention.date}> - <div className={classNames('retention__table__box', `retention__table__box--${roundTo10(retention.percent * 100)}`)}> - <FormattedNumber value={retention.percent} style='percent' /> + <div className={classNames('retention__table__box', `retention__table__box--${roundTo10(retention.rate * 100)}`)}> + <FormattedNumber value={retention.rate} style='percent' /> </div> </td> ))} |