Remove stats from index
This commit is contained in:
@@ -12,7 +12,6 @@ import HeadLayout from '../components/head-layout'
|
||||
import Footer from '../components/footer'
|
||||
import {jwennStats} from '../lib/oki-api'
|
||||
|
||||
import KatStats from '../components/stats/kat-stats'
|
||||
import KatKayLa from '../components/kat-kay-la'
|
||||
|
||||
import Custom500 from './500'
|
||||
@@ -25,36 +24,6 @@ export default function Home({errorCode, errorMessage, stats}) {
|
||||
return <Custom500 statusCode={errorCode} />
|
||||
}
|
||||
|
||||
const {parolesWithoutTranslation} = stats
|
||||
|
||||
const statsByLang = [
|
||||
{
|
||||
code: 'fr',
|
||||
value: parolesWithoutTranslation.francais,
|
||||
emoji: '🇫🇷'
|
||||
},
|
||||
{
|
||||
code: 'en',
|
||||
value: parolesWithoutTranslation.anglais,
|
||||
emoji: '🇬🇧'
|
||||
},
|
||||
{
|
||||
code: 'es',
|
||||
value: parolesWithoutTranslation.espagnol,
|
||||
emoji: '🇪🇸'
|
||||
},
|
||||
{
|
||||
code: 'de',
|
||||
value: parolesWithoutTranslation.allemand,
|
||||
emoji: '🇩🇪'
|
||||
},
|
||||
{
|
||||
code: 'it',
|
||||
value: parolesWithoutTranslation.italien,
|
||||
emoji: '🇮🇹'
|
||||
}
|
||||
]
|
||||
|
||||
return (
|
||||
<HeadLayout tab={0}>
|
||||
<Box sx={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
|
||||
@@ -70,37 +39,12 @@ export default function Home({errorCode, errorMessage, stats}) {
|
||||
Paroles, traductions et Fédiverse
|
||||
</Typography>
|
||||
</Container>
|
||||
<Container>
|
||||
<Grid container justifyContent='center' spacing={2}>
|
||||
<Grid item>
|
||||
<Button variant='outlined' onClick={() => router.push('/soumet')}>
|
||||
<strong>Soumettre un texte</strong>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<Button variant='outlined' onClick={() => router.push('/soutyen')}>
|
||||
<strong>Nous soutenir</strong>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Container>
|
||||
</Box>
|
||||
<Container sx={{flexGrow: 100}}>
|
||||
<Divider sx={{marginBottom: 3}}>
|
||||
<Chip sx={{fontWeight: 'bold'}} color='primary' label='Statistiques' variant='outlined' />
|
||||
</Divider>
|
||||
<Grid container spacing={2} sx={{marginBottom: 3}}>
|
||||
<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' />
|
||||
</Grid>
|
||||
<Typography marginBottom={2} textAlign='center' sx={{fontWeight: 'bold'}} variant='h6' component='h4'>
|
||||
Traductions
|
||||
</Typography>
|
||||
<Grid container justifyContent='space-between' spacing={2} marginBottom={3}>
|
||||
{statsByLang.map(({code, value, emoji}) => (
|
||||
<KatStats key={code} emoji={emoji} value={value} total={stats.countParole} />
|
||||
))}
|
||||
</Grid>
|
||||
</Container>
|
||||
<Footer />
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user