From 04a1ceb257311a98fffc4b18679f73789b920e09 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 3 Jan 2022 12:24:04 +0100 Subject: chore: display subjects list under articles --- src/components/PostFooter/PostFooter.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/components/PostFooter/PostFooter.tsx') diff --git a/src/components/PostFooter/PostFooter.tsx b/src/components/PostFooter/PostFooter.tsx index 8c09d69..fe933d7 100644 --- a/src/components/PostFooter/PostFooter.tsx +++ b/src/components/PostFooter/PostFooter.tsx @@ -1,5 +1,6 @@ import { t } from '@lingui/macro'; import { SubjectPreview } from '@ts/types/taxonomies'; +import Image from 'next/image'; import Link from 'next/link'; import styles from './PostFooter.module.scss'; @@ -7,9 +8,20 @@ const PostFooter = ({ subjects }: { subjects: SubjectPreview[] }) => { const getSubjects = () => { return subjects.map((subject) => { return ( -
  • +
  • - {subject.title} + + {subject.featuredImage && ( + {subject.featuredImage.altText} + )} + {subject.title} +
  • ); @@ -21,7 +33,7 @@ const PostFooter = ({ subjects }: { subjects: SubjectPreview[] }) => { {subjects.length > 0 && ( <>
    -
    {t`Subjects:`}
    +
    {t`Read more articles about:`}
      {getSubjects()}
    -- cgit v1.2.3