Change komante to commentaire
This commit is contained in:
@@ -45,7 +45,7 @@ const Root = styled('div')((
|
||||
|
||||
const KomanteTooltip = Tooltip
|
||||
|
||||
export default function VweKomante({komante, teks}) {
|
||||
export default function VweKomante({commentaires, parole, paroleId}) {
|
||||
const [esOuve, meteEsOuve] = useState(false)
|
||||
const [esKoneksyonOuve, meteEsKoneksyonOuve] = useState(false)
|
||||
const [esKomenteOuve, meteEsKomanteOuve] = useState(false)
|
||||
@@ -88,7 +88,7 @@ export default function VweKomante({komante, teks}) {
|
||||
size='large'
|
||||
onClick={handleClick}
|
||||
>
|
||||
<Badge badgeContent={komante.length} color='primary'>
|
||||
<Badge badgeContent={commentaires.length} color='primary'>
|
||||
<CommentIcon />
|
||||
</Badge>
|
||||
</IconButton>
|
||||
@@ -109,8 +109,8 @@ export default function VweKomante({komante, teks}) {
|
||||
tabIndex={-1}
|
||||
component='div'
|
||||
>
|
||||
{komante.length > 0 ? (
|
||||
<KomanteList komante={komante} />
|
||||
{commentaires.length > 0 ? (
|
||||
<KomanteList commentaires={commentaires} />
|
||||
) : (
|
||||
<Typography component='div' align='center'>
|
||||
Aucun commentaire
|
||||
@@ -140,7 +140,7 @@ export default function VweKomante({komante, teks}) {
|
||||
)}
|
||||
{session && session.user && esKomenteOuve && (
|
||||
<>
|
||||
<EkriKomante session={session} teks={teks} meteEsKomanteOuve={meteEsKomanteOuve} />
|
||||
<EkriKomante session={session} parole={parole} paroleId={paroleId} meteEsKomanteOuve={meteEsKomanteOuve} />
|
||||
<Button fullWidth style={{marginBottom: 10}} color='primary' onClick={() => meteEsKomanteOuve(false)}>
|
||||
Fermer
|
||||
</Button>
|
||||
@@ -152,10 +152,11 @@ export default function VweKomante({komante, teks}) {
|
||||
}
|
||||
|
||||
VweKomante.defaultProps = {
|
||||
komante: null
|
||||
commentaires: null
|
||||
}
|
||||
|
||||
VweKomante.propTypes = {
|
||||
komante: PropTypes.array,
|
||||
teks: PropTypes.object.isRequired
|
||||
commentaires: PropTypes.array,
|
||||
parole: PropTypes.object.isRequired,
|
||||
paroleId: PropTypes.number.isRequired
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user