diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/templates/layout/layout.test.tsx | 1 | ||||
| -rw-r--r-- | src/components/templates/layout/layout.tsx | 9 | ||||
| -rw-r--r-- | src/utils/hooks/use-settings.tsx | 21 |
3 files changed, 5 insertions, 26 deletions
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<LayoutProps> = ({ }) => { 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<LayoutProps> = ({ name: name, url: url, jobTitle: baseline, - image: picture.src, + image: photo.src, subjectOf: { '@id': `${url}` }, }; @@ -199,7 +200,7 @@ const Layout: FC<LayoutProps> = ({ isHome={isHome} motionStorageKey="reduced-motion" nav={mainNav} - photo={picture} + photo={photo} searchPage="/recherche" title={name} withLink={true} @@ -229,7 +230,7 @@ const Layout: FC<LayoutProps> = ({ * 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 = ( diff --git a/src/utils/hooks/use-settings.tsx b/src/utils/hooks/use-settings.tsx index cc5261b..a1d1a65 100644 --- a/src/utils/hooks/use-settings.tsx +++ b/src/utils/hooks/use-settings.tsx @@ -1,4 +1,3 @@ -import photo from '@assets/images/armand-philippot.jpg'; import { settings } from '@utils/config'; import { useRouter } from 'next/router'; @@ -31,21 +30,6 @@ export type LocaleSettings = { supported: string[]; }; -export type PictureSettings = { - /** - * The picture height. - */ - height: number; - /** - * The picture url. - */ - src: string; - /** - * The picture width. - */ - width: number; -}; - export type WebsiteSettings = { /** * The website name. @@ -68,10 +52,6 @@ export type WebsiteSettings = { */ locales: LocaleSettings; /** - * A picture representing the website. - */ - picture: PictureSettings; - /** * The website url. */ url: string; @@ -109,7 +89,6 @@ const useSettings = (): UseSettingsReturn => { supported: locales.supported, }, name, - picture: photo, url, }, }; |
