Reduce index stats cards
This commit is contained in:
@@ -2,11 +2,14 @@ import PropTypes from 'prop-types'
|
|||||||
import Card from '@mui/material/Card'
|
import Card from '@mui/material/Card'
|
||||||
import CardContent from '@mui/material/CardContent'
|
import CardContent from '@mui/material/CardContent'
|
||||||
import Typography from '@mui/material/Typography'
|
import Typography from '@mui/material/Typography'
|
||||||
|
import Grid from '@mui/material/Grid'
|
||||||
|
|
||||||
import TraductionsStats from './traductions-stats'
|
import TraductionsStats from './traductions-stats'
|
||||||
|
|
||||||
export default function KatStats({emoji, value, total}) {
|
export default function KatStats({emoji, value, total}) {
|
||||||
return (
|
return (
|
||||||
<Card sx={{marginBottom: 2}} variant='outlined'>
|
<Grid item xs={12} md={6}>
|
||||||
|
<Card variant='outlined'>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Typography gutterBottom align='center' variant='h6'>
|
<Typography gutterBottom align='center' variant='h6'>
|
||||||
<span dangerouslySetInnerHTML={{__html: emoji}} />
|
<span dangerouslySetInnerHTML={{__html: emoji}} />
|
||||||
@@ -14,6 +17,7 @@ export default function KatStats({emoji, value, total}) {
|
|||||||
<TraductionsStats value={value} total={total} />
|
<TraductionsStats value={value} total={total} />
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
</Grid>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -80,11 +80,11 @@ export default function Home({errorCode, errorMessage, stats}) {
|
|||||||
<KatKayLa tit='Paroles' kantite={stats.countParole} href='/paroles' as='/paroles' />
|
<KatKayLa tit='Paroles' kantite={stats.countParole} href='/paroles' as='/paroles' />
|
||||||
<KatKayLa tit='Artistes' kantite={stats.countArtiste} href='/awtis?paj&paj=1' as='/awtis/paj/1' />
|
<KatKayLa tit='Artistes' kantite={stats.countArtiste} href='/awtis?paj&paj=1' as='/awtis/paj/1' />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Box marginBottom={3}>
|
<Grid container spacing={2} marginBottom={3}>
|
||||||
{statsByLang.map(({code, value, emoji}) => (
|
{statsByLang.map(({code, value, emoji}) => (
|
||||||
<KatStats key={code} emoji={emoji} value={value} total={stats.countParole} />
|
<KatStats key={code} emoji={emoji} value={value} total={stats.countParole} />
|
||||||
))}
|
))}
|
||||||
</Box>
|
</Grid>
|
||||||
</Container>
|
</Container>
|
||||||
<Footer />
|
<Footer />
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user