fix: unifier la logique de choix de taille d'image via formatKuveti
This commit is contained in:
@@ -45,11 +45,11 @@ export default function AwtisDetay({anAwtis}) {
|
||||
|
||||
const hasStreaming = isExclusiveArtist && titrePhare?.streamAudio?.length > 0
|
||||
const coverUrl = titrePhare?.couverture
|
||||
? `${IMAGE_URL}${titrePhare.couverture.formats?.small?.url || titrePhare.couverture.formats?.thumbnail?.url || titrePhare.couverture.url}`
|
||||
? `${IMAGE_URL}${formatKuveti(titrePhare.couverture, 'small')?.url}`
|
||||
: null
|
||||
|
||||
const photoUrl = photo?.url
|
||||
? `${IMAGE_URL}${photo.formats?.small?.url || photo.formats?.thumbnail?.url || photo.url}`
|
||||
? `${IMAGE_URL}${formatKuveti(photo, 'small')?.url}`
|
||||
: null
|
||||
|
||||
return (
|
||||
@@ -193,7 +193,7 @@ export default function AwtisDetay({anAwtis}) {
|
||||
<AccordionDetails sx={{paddingInline: 0}}>
|
||||
{sortedTeks.map(anPawol => {
|
||||
const {couverture} = anPawol
|
||||
const kuvetiFormat = couverture?.formats?.thumbnail || formatKuveti(couverture, 'small')
|
||||
const kuvetiFormat = formatKuveti(couverture, 'thumbnail')
|
||||
return (
|
||||
<Box key={anPawol.id} sx={{paddingBlock: 0.5}}>
|
||||
<MizikLyen anPawol={anPawol} kuveti={kuvetiFormat} />
|
||||
@@ -210,7 +210,7 @@ export default function AwtisDetay({anAwtis}) {
|
||||
<Box>
|
||||
<Typography gutterBottom variant='body1'><strong>Parole</strong></Typography>
|
||||
<Paper sx={{paddingBlock: 2}}>
|
||||
<MizikLyen anPawol={paroles[0]} kuveti={paroles[0].couverture?.formats?.thumbnail || formatKuveti(paroles[0].couverture, 'small')} />
|
||||
<MizikLyen anPawol={paroles[0]} kuveti={formatKuveti(paroles[0].couverture, 'thumbnail')} />
|
||||
</Paper>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user