diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-23 00:20:08 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-23 00:24:39 +0100 |
| commit | 368fbbf83b913b90cef9dfbe4288e148d589d033 (patch) | |
| tree | e86d6006dec67ffe485cbab5141609759ce7d501 /src/components/PostMeta/PostMeta.tsx | |
| parent | 6d514259dd5e60af83b42f938ea9f6b017b7377f (diff) | |
refactor: rename all subject occurrences into topic
I change the name in graphql endpoint, so I decided to repercute this
change here.
Diffstat (limited to 'src/components/PostMeta/PostMeta.tsx')
| -rw-r--r-- | src/components/PostMeta/PostMeta.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/components/PostMeta/PostMeta.tsx b/src/components/PostMeta/PostMeta.tsx index 0b68d70..57c2ded 100644 --- a/src/components/PostMeta/PostMeta.tsx +++ b/src/components/PostMeta/PostMeta.tsx @@ -13,7 +13,7 @@ const PostMeta = ({ meta: ArticleMeta; mode?: PostMetaMode; }) => { - const { author, commentCount, dates, subjects, thematics, website } = meta; + const { author, commentCount, dates, topics, thematics, website } = meta; const { asPath, locale } = useRouter(); const isThematic = () => asPath.includes('/thematique/'); const isArticle = () => asPath.includes('/article/'); @@ -24,14 +24,14 @@ const PostMeta = ({ year: 'numeric', }; - const getSubjects = () => { + const getTopics = () => { return ( - subjects && - subjects.map((subject) => { + topics && + topics.map((topic) => { return ( - <dd key={subject.id} className={styles.description}> - <Link href={`/sujet/${subject.slug}`}> - <a>{subject.title}</a> + <dd key={topic.id} className={styles.description}> + <Link href={`/sujet/${topic.slug}`}> + <a>{topic.title}</a> </Link> </dd> ); @@ -102,12 +102,12 @@ const PostMeta = ({ {getThematics()} </div> )} - {isThematic() && subjects && subjects.length > 0 && ( + {isThematic() && topics && topics.length > 0 && ( <div className={styles.item}> <dt className={styles.term}> - {subjects.length > 1 ? t`Subjects` : t`Subject`} + {topics.length > 1 ? t`Topics` : t`Topic`} </dt> - {getSubjects()} + {getTopics()} </div> )} {website && ( |
