Change DenyeTeks commonent : add Skeleton feature

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-05-14 01:27:11 +04:00
parent d32693c8ac
commit 1711068f72
4 changed files with 173 additions and 40 deletions
+5 -7
View File
@@ -117,11 +117,11 @@ const Root = styled('div')((
const drawerWidth = 240
export default function TeksDrawer({teks, anTeks, komante, denyeTeks}) {
export default function TeksDrawer({teks, anTeks, komante}) {
const theme = useTheme()
const [esMobilOuve, meteEsMobilOuve] = useState(false)
const [open, setOpen] = useState(false)
const [error, setError] = useState('')
const [error, setError] = useState(null)
const [success, setSuccess] = useState('')
const handleClose = (event, reason) => {
@@ -230,7 +230,7 @@ export default function TeksDrawer({teks, anTeks, komante, denyeTeks}) {
/>
) : (
<Box sx={{marginTop: '5em'}}>
<DenyeTeks {...denyeTeks} />
<DenyeTeks error={error} setError={setError} />
</Box>
)}
</main>
@@ -241,12 +241,10 @@ export default function TeksDrawer({teks, anTeks, komante, denyeTeks}) {
TeksDrawer.propTypes = {
teks: PropTypes.array.isRequired,
anTeks: PropTypes.object,
komante: PropTypes.array,
denyeTeks: PropTypes.array
komante: PropTypes.array
}
TeksDrawer.defaultProps = {
anTeks: null,
komante: null,
denyeTeks: null
komante: null
}