[Glitch] Change percentile label in year in review in web UI

Port 6cf87762a4 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2921/head
Eugen Rochko 2024-12-03 09:57:29 +01:00 committed by Claire
parent 93631757b8
commit 062723cfb2
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
/* eslint-disable react/jsx-no-useless-fragment */
import { FormattedMessage, FormattedNumber } from 'react-intl';
import { domain } from 'flavours/glitch/initial_state';
import type { Percentiles } from 'flavours/glitch/models/annual_report';
export const Percentile: React.FC<{
@ -12,7 +13,7 @@ export const Percentile: React.FC<{
<div className='annual-report__bento__box annual-report__summary__percentile'>
<FormattedMessage
id='annual_report.summary.percentile.text'
defaultMessage='<topLabel>That puts you in the top</topLabel><percentage></percentage><bottomLabel>of Mastodon users.</bottomLabel>'
defaultMessage='<topLabel>That puts you in the top</topLabel><percentage></percentage><bottomLabel>of {domain} users.</bottomLabel>'
values={{
topLabel: (str) => (
<div className='annual-report__summary__percentile__label'>
@ -44,6 +45,8 @@ export const Percentile: React.FC<{
)}
</div>
),
domain,
}}
>
{(message) => <>{message}</>}