From e331106e56d59a8b987230860b66214139c12ef6 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Mon, 13 Nov 2023 18:46:31 +0100
Subject: refactor(components): rewrite ImageWidget component

* remove `imageClassName` prop
* replace `image` prop with `img` and expect an image instead of an
object
* remove `alignment prop`
* remove useless CSS
---
 src/pages/cv.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/pages/cv.tsx')

diff --git a/src/pages/cv.tsx b/src/pages/cv.tsx
index c2d3588..ad643c3 100644
--- a/src/pages/cv.tsx
+++ b/src/pages/cv.tsx
@@ -2,6 +2,7 @@
 import type { MDXComponents } from 'mdx/types';
 import type { GetStaticProps } from 'next';
 import Head from 'next/head';
+import NextImage from 'next/image';
 import { useRouter } from 'next/router';
 import Script from 'next/script';
 import React, {
@@ -23,7 +24,6 @@ import {
   Time,
 } from '../components';
 import CVContent, { data, meta } from '../content/pages/cv.mdx';
-import styles from '../styles/pages/cv.module.scss';
 import type { NextPageWithLayout } from '../types';
 import { PERSONAL_LINKS, ROUTES } from '../utils/constants';
 import {
@@ -219,8 +219,7 @@ const CVPage: NextPageWithLayout = () => {
           {imageWidgetTitle}
         </Heading>
       }
-      image={image}
-      imageClassName={styles.image}
+      img={<NextImage {...image} />}
       // eslint-disable-next-line react/jsx-no-literals -- Key allowed
       key="image-widget"
     />,
-- 
cgit v1.2.3

