Prevent errors from index and paroles pages
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {Container, Grid} from '@mui/material'
|
||||
import PropTypes from 'prop-types'
|
||||
import {Container, Grid, Typography} from '@mui/material'
|
||||
|
||||
import {styled} from '@mui/material/styles'
|
||||
|
||||
@@ -17,14 +18,25 @@ const Root = styled('div')(() => ({
|
||||
}
|
||||
}))
|
||||
|
||||
export default function DenyeTeks(denyeTeks) {
|
||||
export default function DenyeTeks({denyeTeks}) {
|
||||
return (
|
||||
<Root className={classes.container}>
|
||||
<Container>
|
||||
{denyeTeks.length === 0 && (
|
||||
<Container sx={{marginTop: 2}} align='center'>
|
||||
<Typography sx={{fontWeight: 'bold'}} variant='h6' component='h4'>
|
||||
Aucun résultat
|
||||
</Typography>
|
||||
</Container>
|
||||
)}
|
||||
<Grid container spacing={3}>
|
||||
{Object.values(denyeTeks).map(t => <TeksKat key={t.id} teks={t} />)}
|
||||
{denyeTeks.map(t => <TeksKat key={t.id} teks={t} />)}
|
||||
</Grid>
|
||||
</Container>
|
||||
</Root>
|
||||
)
|
||||
}
|
||||
|
||||
DenyeTeks.propTypes = {
|
||||
denyeTeks: PropTypes.array.isRequired
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user