Change komante to commentaire
This commit is contained in:
@@ -35,23 +35,23 @@ const StyledList = styled(List)((
|
||||
}
|
||||
}))
|
||||
|
||||
export default function KomanteList({komante}) {
|
||||
export default function KomanteList({commentaires}) {
|
||||
return (
|
||||
<StyledList className={classes.root}>
|
||||
{komante.map(({id, username, kontni, sentAt}) => (
|
||||
{commentaires.map(({id, attributes}) => (
|
||||
<div key={id}>
|
||||
<ListItemText
|
||||
primary={
|
||||
<Typography gutterBottom style={{fontWeight: 'bold'}} variant='body1'>
|
||||
{username}
|
||||
<Typography gutterBottom style={{textDecoration: 'underline'}} variant='body1'>
|
||||
<small>{attributes.user.data.attributes.username}</small>
|
||||
</Typography>
|
||||
}
|
||||
/>
|
||||
<ListItemText
|
||||
primary={formatJsonString(kontni)}
|
||||
primary={formatJsonString(attributes.contenu)}
|
||||
secondary={
|
||||
<Typography gutterBottom style={{marginBlock: 5, fontStyle: 'italic'}} variant='caption' display='block'>
|
||||
{format(new Date(sentAt), 'Pp', {locale: fr})}
|
||||
{format(new Date(attributes.datePublication), 'Pp', {locale: fr})}
|
||||
</Typography>
|
||||
}
|
||||
/>
|
||||
@@ -63,5 +63,5 @@ export default function KomanteList({komante}) {
|
||||
}
|
||||
|
||||
KomanteList.propTypes = {
|
||||
komante: PropTypes.array.isRequired
|
||||
commentaires: PropTypes.array.isRequired
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user