From 427f629e5c05f83ab720b954688bd1488000fcda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Fri, 28 May 2021 18:29:15 +0200 Subject: [PATCH] Add image thumbnail teks to head --- components/head-layout.js | 22 ++++++++++++++++------ pages/teks/[slug].js | 8 +++++++- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/components/head-layout.js b/components/head-layout.js index d5a8ac3..e774b01 100644 --- a/components/head-layout.js +++ b/components/head-layout.js @@ -4,9 +4,13 @@ import Head from 'next/head' import Navigasyon from './navigasyon' const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000' +const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:1337' export default function HeadLayout({ children, + imageUrl, + imageWidth, + imageHeight, title, tab, slug @@ -24,7 +28,7 @@ export default function HeadLayout({ - + @@ -39,12 +43,12 @@ export default function HeadLayout({ - - + + - - - + + + {children} @@ -54,12 +58,18 @@ export default function HeadLayout({ HeadLayout.propTypes = { children: PropTypes.node.isRequired, + imageUrl: PropTypes.string, + imageWidth: PropTypes.number, + imageHeight: PropTypes.number, title: PropTypes.string, tab: PropTypes.number.isRequired, slug: PropTypes.string } HeadLayout.defaultProps = { + imageUrl: null, + imageWidth: null, + imageHeight: null, title: null, slug: null } diff --git a/pages/teks/[slug].js b/pages/teks/[slug].js index 0d9e333..8cd7bf6 100644 --- a/pages/teks/[slug].js +++ b/pages/teks/[slug].js @@ -11,9 +11,15 @@ const jwennAwtis = awtis => { export default function SlugTeks({teks, anTeks, slug}) { const awtis = anTeks.awtis.length === 1 ? anTeks.awtis[0].alias : jwennAwtis(anTeks.awtis) + const {kouveti} = anTeks return ( - + )