Fix image url
This commit is contained in:
@@ -26,23 +26,23 @@ export default function SlugTeks({hasError, errorMessage, paroles, parole, slug,
|
||||
const artistes = parole.attributes.artistes.length === 1 ? parole.attributes.artistes[0].data.attributes.alias : jwennAwtis(parole.attributes.artistes)
|
||||
const {couverture} = parole.attributes
|
||||
const formatKouveti = () => {
|
||||
if (!couverture) {
|
||||
if (!couverture?.data?.attributes) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (couverture && couverture.formats && couverture.formats.large) {
|
||||
if (couverture.data.attributes && couverture.data.attributes.formats && couverture.data.attributes.formats.large) {
|
||||
return couverture.formats.large
|
||||
}
|
||||
|
||||
if (couverture && couverture.formats && couverture.formats.medium) {
|
||||
if (couverture.data.attributes && couverture.data.attributes.formats && couverture.data.attributes.formats.medium) {
|
||||
return couverture.formats.medium
|
||||
}
|
||||
|
||||
if (couverture && couverture.formats && couverture.formats.small) {
|
||||
if (couverture.data.attributes && couverture.data.attributes.formats && couverture.data.attributes.formats.small) {
|
||||
return couverture.formats.small
|
||||
}
|
||||
|
||||
return couverture
|
||||
return couverture.data.attributes
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user