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/PostFooter/PostFooter.tsx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/components/PostFooter/PostFooter.tsx') diff --git a/src/components/PostFooter/PostFooter.tsx b/src/components/PostFooter/PostFooter.tsx index 06e86bc..ad471eb 100644 --- a/src/components/PostFooter/PostFooter.tsx +++ b/src/components/PostFooter/PostFooter.tsx @@ -1,26 +1,25 @@ import { ButtonLink } from '@components/Buttons'; import { t } from '@lingui/macro'; -import { SubjectPreview } from '@ts/types/taxonomies'; +import { TopicPreview } from '@ts/types/taxonomies'; import Image from 'next/image'; -import Link from 'next/link'; import styles from './PostFooter.module.scss'; -const PostFooter = ({ subjects }: { subjects: SubjectPreview[] }) => { - const getSubjects = () => { - return subjects.map((subject) => { +const PostFooter = ({ topics }: { topics: TopicPreview[] }) => { + const getTopics = () => { + return topics.map((topic) => { return ( -
  • - - {subject.featuredImage && ( +
  • + + {topic.featuredImage && ( {subject.featuredImage.altText} )} - {subject.title} + {topic.title}
  • ); @@ -29,12 +28,12 @@ const PostFooter = ({ subjects }: { subjects: SubjectPreview[] }) => { return (