File tree Expand file tree Collapse file tree
features/settings/components/GeneralSettings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020} from 'src/lib/analytics'
2121import { useUserPreferences } from 'src/stores/preferences'
2222import { Option } from 'src/types'
23+ import { pluralize } from 'src/utils/String'
2324import { DNDSettings } from './DNDSettings'
2425import './generalSettings.css'
2526
@@ -65,7 +66,7 @@ const UserInfo = ({ user }: UserInfoProps) => {
6566 You're on{ ' ' }
6667 < span >
6768 { ' ' }
68- < FaFire color = "orange" size = { 18 } /> < b > { user . streak || 1 } days streak</ b >
69+ < FaFire color = "orange" size = { 18 } /> < b > { pluralize ( user . streak || 1 , 'day' ) } streak</ b >
6970 </ span >
7071 </ p >
7172 < div >
Original file line number Diff line number Diff line change 1+ export const pluralize = ( count : number , noun : string , suffix = 's' ) =>
2+ `${ count } ${ noun } ${ count !== 1 ? suffix : '' } `
You can’t perform that action at this time.
0 commit comments