Replace join by Intl object

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-02-05 14:21:56 +04:00
parent 3f487c5aa4
commit a7a9b15b59
6 changed files with 13 additions and 6 deletions
+2 -1
View File
@@ -118,6 +118,7 @@ export default function Teks({anTeks, komante, open, success, error, setSuccess,
const isMobile = useMediaQuery('(max-width:800px)')
const {data: session} = useSession()
const langArray = langToArray(anTeks)
const awtis = anTeks.awtis.map(({alias}) => alias)
return (
<Root>
@@ -127,7 +128,7 @@ export default function Teks({anTeks, komante, open, success, error, setSuccess,
<Box sx={{textAlign: 'center', marginTop: 8}}>
<Typography style={{marginTop: '0.8em'}} variant='h4' display='block'>
<Typography gutterBottom variant='h6'>
{anTeks.awtis.map(a => a.alias).join(', ')}
{new Intl.ListFormat('fr').format(awtis)}
</Typography>
<Typography variant='h5'>
{anTeks.tit}