summaryrefslogtreecommitdiffstats
path: root/src/components/PostFooter/PostFooter.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/PostFooter/PostFooter.tsx')
-rw-r--r--src/components/PostFooter/PostFooter.tsx18
1 files changed, 15 insertions, 3 deletions
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 (
- <li key={subject.id}>
+ <li className={styles.item} key={subject.id}>
<Link href={`/sujet/${subject.slug}`}>
- <a>{subject.title}</a>
+ <a className={styles.link}>
+ {subject.featuredImage && (
+ <Image
+ src={subject.featuredImage.sourceUrl}
+ alt={subject.featuredImage.altText}
+ layout="intrinsic"
+ width="20"
+ height="20"
+ />
+ )}
+ {subject.title}
+ </a>
</Link>
</li>
);
@@ -21,7 +33,7 @@ const PostFooter = ({ subjects }: { subjects: SubjectPreview[] }) => {
{subjects.length > 0 && (
<>
<dl className={styles.meta}>
- <dt>{t`Subjects:`}</dt>
+ <dt>{t`Read more articles about:`}</dt>
<dd>
<ul className={styles.list}>{getSubjects()}</ul>
</dd>