Use codemod preset-safe

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-01-19 07:06:26 +04:00
parent 33e2d5dfda
commit 172852c087
35 changed files with 245 additions and 231 deletions
+71 -66
View File
@@ -13,8 +13,8 @@ import {
Typography,
Tooltip,
Zoom
} from '@material-ui/core'
import AddCommentIcon from '@material-ui/icons/AddComment'
} from '@mui/material'
import AddCommentIcon from '@mui/icons-material/AddComment'
import {useRouter} from 'next/router'
import Koneksyon from '../sesyon/koneksyon'
import KomanteList from './komante-list'
@@ -70,75 +70,80 @@ export default function VweKomante({komante, teks}) {
}, [esOuve])
return (
(
<Root>
<KomanteTooltip
title='Komantè'
placement='bottom'
TransitionComponent={Zoom}
classes={{
tooltip: classes.tooltip
}}
<Root>
<KomanteTooltip
title='Komantè'
placement='bottom'
TransitionComponent={Zoom}
classes={{
tooltip: classes.tooltip
}}
>
<IconButton
className={classes.margin}
color='primary'
aria-label='commentaire'
component='span'
size='large'
onClick={handleClick}
>
<IconButton className={classes.margin} color='primary' aria-label='commentaire' component='span' onClick={handleClick}>
<AddCommentIcon />
</IconButton>
</KomanteTooltip>
<Dialog
open={esOuve}
scroll='paper'
aria-labelledby='scroll-dialog-title'
aria-describedby='scroll-dialog-description'
onClose={handleClose}
>
<DialogTitle align='center' id='scroll-dialog-title'>Kòmantè</DialogTitle>
<DialogContent dividers>
<Typography
ref={descriptionElementRef}
variant='inherit'
id='scroll-dialog-description'
tabIndex={-1}
>
{komante.length > 0 ? (
<KomanteList komante={komante} />
) : (
<Typography align='center'>
Aucun
</Typography>
)}
</Typography>
</DialogContent>
<DialogActions align='center' >
{session && session.user && !esKomenteOuve && (
<Button fullWidth color='primary' onClick={() => meteEsKomanteOuve(true)}>
Ajouter un commentaire
</Button>
<AddCommentIcon />
</IconButton>
</KomanteTooltip>
<Dialog
open={esOuve}
scroll='paper'
aria-labelledby='scroll-dialog-title'
aria-describedby='scroll-dialog-description'
onClose={handleClose}
>
<DialogTitle align='center' id='scroll-dialog-title'>Kòmantè</DialogTitle>
<DialogContent dividers>
<Typography
ref={descriptionElementRef}
variant='inherit'
id='scroll-dialog-description'
tabIndex={-1}
>
{komante.length > 0 ? (
<KomanteList komante={komante} />
) : (
<Typography align='center'>
Aucun
</Typography>
)}
{!session && !esKoneksyonOuve && (
<Button fullWidth color='primary' onClick={() => meteEsKoneksyonOuve(true)}>
Se connecter pour commenter
</Button>
)}
{!session && esKoneksyonOuve && (
<Koneksyon chimen={router.asPath} />
)}
</DialogActions>
{!session && esKoneksyonOuve && (
<Button style={{marginBottom: 10}} color='primary' onClick={() => meteEsKoneksyonOuve(false)}>
Annuler
</Typography>
</DialogContent>
<DialogActions align='center' >
{session && session.user && !esKomenteOuve && (
<Button fullWidth color='primary' onClick={() => meteEsKomanteOuve(true)}>
Ajouter un commentaire
</Button>
)}
{session && session.user && esKomenteOuve && (
<>
<EkriKomante session={session} teks={teks} meteEsKomanteOuve={meteEsKomanteOuve} />
<Button fullWidth style={{marginBottom: 10}} color='primary' onClick={() => meteEsKomanteOuve(false)}>
Fermer
</Button>
</>
{!session && !esKoneksyonOuve && (
<Button fullWidth color='primary' onClick={() => meteEsKoneksyonOuve(true)}>
Se connecter pour commenter
</Button>
)}
</Dialog>
</Root>
)
{!session && esKoneksyonOuve && (
<Koneksyon chimen={router.asPath} />
)}
</DialogActions>
{!session && esKoneksyonOuve && (
<Button style={{marginBottom: 10}} color='primary' onClick={() => meteEsKoneksyonOuve(false)}>
Annuler
</Button>
)}
{session && session.user && esKomenteOuve && (
<>
<EkriKomante session={session} teks={teks} meteEsKomanteOuve={meteEsKomanteOuve} />
<Button fullWidth style={{marginBottom: 10}} color='primary' onClick={() => meteEsKomanteOuve(false)}>
Fermer
</Button>
</>
)}
</Dialog>
</Root>
)
}