From d738152a59d2ef8f476b16789ba386dc57ff2211 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Sat, 8 Jan 2022 19:34:18 +0100
Subject: refactor: improve button-like links styles

The goal was to replace the "read more articles about" links with
button-like links to keep a certain consistence between buttons.
The hasIcon variable was useless so I update some components and
especially the back to top link.
---
 src/components/PostFooter/PostFooter.tsx | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

(limited to 'src/components/PostFooter/PostFooter.tsx')

diff --git a/src/components/PostFooter/PostFooter.tsx b/src/components/PostFooter/PostFooter.tsx
index fe933d7..06e86bc 100644
--- a/src/components/PostFooter/PostFooter.tsx
+++ b/src/components/PostFooter/PostFooter.tsx
@@ -1,3 +1,4 @@
+import { ButtonLink } from '@components/Buttons';
 import { t } from '@lingui/macro';
 import { SubjectPreview } from '@ts/types/taxonomies';
 import Image from 'next/image';
@@ -9,20 +10,18 @@ const PostFooter = ({ subjects }: { subjects: SubjectPreview[] }) => {
     return subjects.map((subject) => {
       return (
         <li className={styles.item} key={subject.id}>
-          <Link href={`/sujet/${subject.slug}`}>
-            <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>
+          <ButtonLink target={`/sujet/${subject.slug}`}>
+            {subject.featuredImage && (
+              <Image
+                src={subject.featuredImage.sourceUrl}
+                alt={subject.featuredImage.altText}
+                layout="intrinsic"
+                width="20"
+                height="20"
+              />
+            )}
+            {subject.title}
+          </ButtonLink>
         </li>
       );
     });
-- 
cgit v1.2.3

