Adapt components with API response
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user