Adapt components with API response

This commit is contained in:
2026-04-21 19:16:11 +04:00
parent 0a96b20a85
commit 6b94f95bb8
22 changed files with 123 additions and 124 deletions
+3 -3
View File
@@ -66,7 +66,7 @@ export default function AwtisKat({artiste}) {
className={classes.media}
component='img'
alt={alias}
image={`${photo?.data?.attributes?.url ? `${IMAGE_URL}${photo?.data?.attributes?.url}` : noImageUrl}`}
image={`${photo?.url ? `${IMAGE_URL}${photo?.url}` : noImageUrl}`}
title={alias}
/>
<CardContent>
@@ -74,7 +74,7 @@ export default function AwtisKat({artiste}) {
{alias}
</Typography>
<Typography align='center' variant='body2' color='textSecondary' component='h5'>
{`${paroles.data.length === 0 ? 'Aucune parole pour le moment' : `${paroles.data.length} ${paroles.data.length > 1 ? 'paroles' : 'parole'}`}`}
{`${paroles.length === 0 ? 'Aucune parole pour le moment' : `${paroles.length} ${paroles.length > 1 ? 'paroles' : 'parole'}`}`}
</Typography>
</CardContent>
</CardActionArea>
@@ -82,7 +82,7 @@ export default function AwtisKat({artiste}) {
{esByografiOuve && (
<AwtisBiyografi
alias={alias}
paroles={paroles.data}
paroles={paroles}
biographie={biographie}
esByografiOuve={esByografiOuve}
meteEsByografiOuve={meteEsByografiOuve}