Remove KatKayLa

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-01-22 14:58:23 +04:00
parent ae966882d1
commit 8e362e1a02
+2 -32
View File
@@ -1,17 +1,9 @@
import PropTypes from 'prop-types' import {Container, Typography, Box} from '@mui/material'
import {Container, Grid, Typography, Box} from '@mui/material'
import KatKayLa from '../components/kat-kay-la'
import HeadLayout from '../components/head-layout' import HeadLayout from '../components/head-layout'
import Footer from '../components/footer' import Footer from '../components/footer'
import {jwennTeksKantite, jwennAwtisKantite} from '../lib/oki-api'
export default function Home({kantiteAwtis, kantiteTeks}) {
const kantite = [
{id: 1, tit: 'Textes', kantite: kantiteTeks, route: '/teks'},
{id: 2, tit: 'Artistes', kantite: kantiteAwtis, route: '/awtis?paj&paj=1'}
]
export default function Home() {
return ( return (
<HeadLayout tab={0}> <HeadLayout tab={0}>
<Box sx={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}> <Box sx={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
@@ -24,31 +16,9 @@ export default function Home({kantiteAwtis, kantiteTeks}) {
Organisation KA Internationale Organisation KA Internationale
</Typography> </Typography>
</Container> </Container>
<Grid container sx={{flexGrow: 1}} justifyContent='center' spacing={3}>
{kantite.map(k => <KatKayLa key={k.id} tit={k.tit} soutit={k.soutit} kantite={k.kantite} route={k.route} />)}
</Grid>
</Box> </Box>
<Footer /> <Footer />
</Box> </Box>
</HeadLayout> </HeadLayout>
) )
} }
Home.propTypes = {
kantiteAwtis: PropTypes.number.isRequired,
kantiteTeks: PropTypes.number.isRequired
}
export async function getServerSideProps() {
const awtisResponse = await jwennAwtisKantite()
const teksResponse = await jwennTeksKantite()
const kantiteAwtis = awtisResponse
const kantiteTeks = teksResponse
return {
props: {
kantiteAwtis,
kantiteTeks
}
}
}