diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-12-17 23:00:41 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-12-18 11:47:54 +0100 |
commit | e061ea5f71109edbbf7869265f443448cace4f60 (patch) | |
tree | 6bbd09eac5440fab09de884d761483418605da19 /app/javascript/flavours/glitch/components/admin | |
parent | d4f315f3044f69dfe64fbfd2348fcaa5deb2aa5e (diff) |
[Glitch] Change title of retention chart
Port 0c17fd91091fd2f230224d5fce218688d480502c to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/components/admin')
-rw-r--r-- | app/javascript/flavours/glitch/components/admin/Retention.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/admin/Retention.js b/app/javascript/flavours/glitch/components/admin/Retention.js index 8295362a4..9127839f6 100644 --- a/app/javascript/flavours/glitch/components/admin/Retention.js +++ b/app/javascript/flavours/glitch/components/admin/Retention.js @@ -42,6 +42,7 @@ export default class Retention extends React.PureComponent { render () { const { loading, data } = this.state; + const { frequency } = this.props; let content; @@ -129,9 +130,18 @@ export default class Retention extends React.PureComponent { ); } + let title = null; + switch(frequency) { + case 'day': + title = <FormattedMessage id='admin.dashboard.daily_retention' defaultMessage='User retention rate by day after sign-up' />; + break; + default: + title = <FormattedMessage id='admin.dashboard.monthly_retention' defaultMessage='User retention rate by month after sign-up' />; + }; + return ( <div className='retention'> - <h4><FormattedMessage id='admin.dashboard.retention' defaultMessage='Retention' /></h4> + <h4>{title}</h4> {content} </div> |