summaryrefslogtreecommitdiffstats
path: root/src/components/PostFooter
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-29 19:03:59 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-29 19:03:59 +0100
commit8fb5e4ef3ae925ebc6622711fb5c8c6147642cbc (patch)
tree9e99137a7b64ea7993a8311a7162336a551be8b2 /src/components/PostFooter
parent2bae7c43764df5678fe2fc2e68be11ae95d85a41 (diff)
parente4d5b8151802517b2943756fc0d09ffa95e2c4e2 (diff)
feat(i18n): replace linguijs with formatjs
Diffstat (limited to 'src/components/PostFooter')
-rw-r--r--src/components/PostFooter/PostFooter.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/PostFooter/PostFooter.tsx b/src/components/PostFooter/PostFooter.tsx
index ad471eb..6c97ec2 100644
--- a/src/components/PostFooter/PostFooter.tsx
+++ b/src/components/PostFooter/PostFooter.tsx
@@ -1,10 +1,12 @@
import { ButtonLink } from '@components/Buttons';
-import { t } from '@lingui/macro';
import { TopicPreview } from '@ts/types/taxonomies';
import Image from 'next/image';
+import { useIntl } from 'react-intl';
import styles from './PostFooter.module.scss';
const PostFooter = ({ topics }: { topics: TopicPreview[] }) => {
+ const intl = useIntl();
+
const getTopics = () => {
return topics.map((topic) => {
return (
@@ -31,7 +33,12 @@ const PostFooter = ({ topics }: { topics: TopicPreview[] }) => {
{topics.length > 0 && (
<>
<dl className={styles.meta}>
- <dt>{t`Read more articles about:`}</dt>
+ <dt>
+ {intl.formatMessage({
+ defaultMessage: 'Read more articles about:',
+ description: 'PostFooter: read more posts about given subjects',
+ })}
+ </dt>
<dd>
<ul className={styles.list}>{getTopics()}</ul>
</dd>