diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-13 18:46:31 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-13 18:53:15 +0100 |
| commit | e331106e56d59a8b987230860b66214139c12ef6 (patch) | |
| tree | 18b595ddd86089b405e9517cd3efc72e2f17a1ab /src/pages | |
| parent | 56878f647ea0f1066fa3e222d7aa0d83057f496d (diff) | |
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
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/cv.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
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" />, |
