Prevent display error when no parole for an artist
This commit is contained in:
@@ -84,6 +84,9 @@ export default function AwtisDetay({anAwtis}) {
|
|||||||
<MizikLis paroles={sortedTeks} />
|
<MizikLis paroles={sortedTeks} />
|
||||||
</AccordionDetails>
|
</AccordionDetails>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
) : (
|
||||||
|
paroles.data.length === 0 ? (
|
||||||
|
<Typography gutterBottom textAlign='center' variant='body1' component='h2'><strong>Aucune parole pour le moment</strong></Typography>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Typography gutterBottom textAlign='center' variant='body1' component='h2'><strong>Parole</strong></Typography>
|
<Typography gutterBottom textAlign='center' variant='body1' component='h2'><strong>Parole</strong></Typography>
|
||||||
@@ -91,6 +94,7 @@ export default function AwtisDetay({anAwtis}) {
|
|||||||
<MizikLis paroles={paroles.data} />
|
<MizikLis paroles={paroles.data} />
|
||||||
</Paper>
|
</Paper>
|
||||||
</>
|
</>
|
||||||
|
)
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -86,11 +86,12 @@ export default function AwtisKat({artiste}) {
|
|||||||
{alias}
|
{alias}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography align='center' variant='body2' color='textSecondary' component='h5'>
|
<Typography align='center' variant='body2' color='textSecondary' component='h5'>
|
||||||
{`${paroles.data.length} ${paroles.data.length > 1 ? 'paroles' : 'parole'}`}
|
{`${paroles.data.length === 0 ? 'Aucune parole pour le moment' : `${paroles.data.length} ${paroles.data.length > 1 ? 'paroles' : 'parole'}`}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</CardActionArea>
|
</CardActionArea>
|
||||||
|
|
||||||
|
{paroles.data.length > 0 && (
|
||||||
<CardActions disableSpacing>
|
<CardActions disableSpacing>
|
||||||
<IconButton
|
<IconButton
|
||||||
className={clsx(classes.expand, {
|
className={clsx(classes.expand, {
|
||||||
@@ -104,6 +105,7 @@ export default function AwtisKat({artiste}) {
|
|||||||
<ExpandMoreIcon />
|
<ExpandMoreIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</CardActions>
|
</CardActions>
|
||||||
|
)}
|
||||||
<Collapse unmountOnExit in={expanded} timeout='auto'>
|
<Collapse unmountOnExit in={expanded} timeout='auto'>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<MizikLis paroles={paroles.data} />
|
<MizikLis paroles={paroles.data} />
|
||||||
|
|||||||
Reference in New Issue
Block a user