From 297654f58e351ac6e10c4f7c465bb62d37d4495b Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 24 May 2022 22:58:15 +0200 Subject: build(deps): bump all dependencies I moved the website picture from useSettings to the layout component since it is only used here. This reduce the number of Jest errors. However, there's still some issues with some images import... --- src/components/templates/layout/layout.test.tsx | 1 - src/components/templates/layout/layout.tsx | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/components/templates/layout') diff --git a/src/components/templates/layout/layout.test.tsx b/src/components/templates/layout/layout.test.tsx index 78547d4..914e1cd 100644 --- a/src/components/templates/layout/layout.test.tsx +++ b/src/components/templates/layout/layout.test.tsx @@ -1,5 +1,4 @@ import { render, screen } from '@test-utils'; -import { BreadcrumbList } from 'schema-dts'; import Layout from './layout'; const body = diff --git a/src/components/templates/layout/layout.tsx b/src/components/templates/layout/layout.tsx index 8f0d4e7..0b1fe99 100644 --- a/src/components/templates/layout/layout.tsx +++ b/src/components/templates/layout/layout.tsx @@ -1,3 +1,4 @@ +import photo from '@assets/images/armand-philippot.jpg'; import ButtonLink from '@components/atoms/buttons/button-link'; import Career from '@components/atoms/icons/career'; import CCBySA from '@components/atoms/icons/cc-by-sa'; @@ -50,7 +51,7 @@ const Layout: FC = ({ }) => { const intl = useIntl(); const { website } = useSettings(); - const { baseline, copyright, locales, name, picture, url } = website; + const { baseline, copyright, locales, name, url } = website; const articleGridClass = useGrid ? 'article--grid' : ''; const articleCommentsClass = withExtraPadding ? 'article--padding' : ''; @@ -156,7 +157,7 @@ const Layout: FC = ({ name: name, url: url, jobTitle: baseline, - image: picture.src, + image: photo.src, subjectOf: { '@id': `${url}` }, }; @@ -199,7 +200,7 @@ const Layout: FC = ({ isHome={isHome} motionStorageKey="reduced-motion" nav={mainNav} - photo={picture} + photo={photo} searchPage="/recherche" title={name} withLink={true} @@ -229,7 +230,7 @@ const Layout: FC = ({ * Get the global layout. * * @param {ReactElement} page - A page. - * @param {boolean} [isHome] - Determine if it is the homepage. + * @param {NextPageWithLayoutOptions} props - An object with layout options. * @returns A page wrapped with the global layout. */ export const getLayout = ( -- cgit v1.2.3