From 368fbbf83b913b90cef9dfbe4288e148d589d033 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 23 Jan 2022 00:20:08 +0100 Subject: refactor: rename all subject occurrences into topic I change the name in graphql endpoint, so I decided to repercute this change here. --- src/components/PostMeta/PostMeta.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/components/PostMeta/PostMeta.tsx') 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 ( -
- - {subject.title} +
+ + {topic.title}
); @@ -102,12 +102,12 @@ const PostMeta = ({ {getThematics()} )} - {isThematic() && subjects && subjects.length > 0 && ( + {isThematic() && topics && topics.length > 0 && (
- {subjects.length > 1 ? t`Subjects` : t`Subject`} + {topics.length > 1 ? t`Topics` : t`Topic`}
- {getSubjects()} + {getTopics()}
)} {website && ( -- cgit v1.2.3