Add summary to descriptions

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-11-11 20:01:42 +04:00
parent 16a82f6b78
commit 849abc026b
2 changed files with 12 additions and 6 deletions
+3
View File
@@ -19,6 +19,8 @@ export default function SlugTeks({hasError, errorMessage, parole, slug}) {
return <Custom404 />
}
const summary = `Paroles de « ${parole?.attributes?.titre} » : ${parole?.attributes?.transcription.slice(0, 100)}...`
const artistes = parole.attributes.artistes.length === 1 ? parole.attributes.artistes[0].data.attributes.alias : getAlias(parole.attributes.artistes, parole.attributes.prioriteArtistes)
const {couverture} = parole.attributes
const formatKouveti = () => {
@@ -48,6 +50,7 @@ export default function SlugTeks({hasError, errorMessage, parole, slug}) {
imageHeight={formatKouveti() ? formatKouveti().height : null}
imageMime={formatKouveti() ? formatKouveti().mime : null}
title={`${artistes} - ${parole.attributes.titre} | Paroles et Traductions`} tab={1} slug={`paroles/${slug}`}
summary={summary}
>
<TeksDrawer parole={parole.attributes} paroleId={parole.id} slug={slug} />
</HeadLayout>