diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-29 18:21:37 +0100 | 
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-29 19:02:57 +0100 | 
| commit | e4d5b8151802517b2943756fc0d09ffa95e2c4e2 (patch) | |
| tree | 9e99137a7b64ea7993a8311a7162336a551be8b2 /src/components/Settings/ReduceMotion | |
| parent | 47b854de26dea24e7838fd0804df103dee99635f (diff) | |
chore: replace lingui functions with react-intl
Diffstat (limited to 'src/components/Settings/ReduceMotion')
| -rw-r--r-- | src/components/Settings/ReduceMotion/ReduceMotion.tsx | 18 | 
1 files changed, 14 insertions, 4 deletions
| diff --git a/src/components/Settings/ReduceMotion/ReduceMotion.tsx b/src/components/Settings/ReduceMotion/ReduceMotion.tsx index 01f8b67..c7b5775 100644 --- a/src/components/Settings/ReduceMotion/ReduceMotion.tsx +++ b/src/components/Settings/ReduceMotion/ReduceMotion.tsx @@ -1,9 +1,10 @@  import { Toggle } from '@components/Form'; -import { t } from '@lingui/macro';  import { LocalStorage } from '@services/local-storage';  import { useEffect, useState } from 'react'; +import { useIntl } from 'react-intl';  const ReduceMotion = () => { +  const intl = useIntl();    const [isDeactivated, setIsDeactivated] = useState<boolean>(false);    useEffect(() => { @@ -23,9 +24,18 @@ const ReduceMotion = () => {    return (      <Toggle        id="reduced-motion" -      label={t`Animations:`} -      leftChoice={t`On`} -      rightChoice={t`Off`} +      label={intl.formatMessage({ +        defaultMessage: 'Animations:', +        description: 'ReduceMotion: toggle label', +      })} +      leftChoice={intl.formatMessage({ +        defaultMessage: 'On', +        description: 'ReduceMotion: toggle on label', +      })} +      rightChoice={intl.formatMessage({ +        defaultMessage: 'Off', +        description: 'ReduceMotion: toggle off label', +      })}        value={isDeactivated}        changeHandler={updateState}      /> | 
