Remove KatKayLa
This commit is contained in:
+2
-32
@@ -1,17 +1,9 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import {Container, Grid, Typography, Box} from '@mui/material'
|
||||
import {Container, Typography, Box} from '@mui/material'
|
||||
|
||||
import KatKayLa from '../components/kat-kay-la'
|
||||
import HeadLayout from '../components/head-layout'
|
||||
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 (
|
||||
<HeadLayout tab={0}>
|
||||
<Box sx={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
|
||||
@@ -24,31 +16,9 @@ export default function Home({kantiteAwtis, kantiteTeks}) {
|
||||
Organisation KA Internationale
|
||||
</Typography>
|
||||
</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>
|
||||
<Footer />
|
||||
</Box>
|
||||
</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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user