Replace 'kombyen' by 'kantite'
This commit is contained in:
+12
-12
@@ -9,15 +9,15 @@ import KatKayLa from '../components/kat-kay-la'
|
||||
import HeadLayout from '../components/head-layout'
|
||||
import Carousel from '../components/carousel'
|
||||
|
||||
export default function Home({konbyenAwtis, konbyenTeks}) {
|
||||
export default function Home({kantiteAwtis, kantiteTeks}) {
|
||||
const [handleOpen, setHandleOpen] = useState(false)
|
||||
const handleClick = () => {
|
||||
setHandleOpen(true)
|
||||
}
|
||||
|
||||
const kombyen = [
|
||||
{id: 1, tit: 'Konbyen Awtis', kombyen: konbyenAwtis, route: '/awtis?paj&paj=1'},
|
||||
{id: 2, tit: 'Konbyen Tèks', kombyen: konbyenTeks, route: '/teks'}
|
||||
const kantite = [
|
||||
{id: 1, tit: 'Kantité Awtis', kantite: kantiteAwtis, route: '/awtis?paj&paj=1'},
|
||||
{id: 2, tit: 'Kantité Tèks', kantite: kantiteTeks, route: '/teks'}
|
||||
]
|
||||
|
||||
const matches = useMediaQuery('(max-width:600px)')
|
||||
@@ -31,7 +31,7 @@ export default function Home({konbyenAwtis, konbyenTeks}) {
|
||||
height={215}
|
||||
src='/logo.png'
|
||||
/>
|
||||
<Typography variant='h3'>
|
||||
<Typography variant='h3' component='h1'>
|
||||
Organisation KA Internationale
|
||||
</Typography>
|
||||
<Typography variant='h4' component='h2' color='textSecondary'>
|
||||
@@ -45,7 +45,7 @@ export default function Home({konbyenAwtis, konbyenTeks}) {
|
||||
</Container>
|
||||
<Container style={{marginTop: '5em'}}>
|
||||
<Grid container spacing={3}>
|
||||
{kombyen.map(k => <KatKayLa key={k.id} tit={k.tit} kombyen={k.kombyen} route={k.route} />)}
|
||||
{kantite.map(k => <KatKayLa key={k.id} tit={k.tit} kantite={k.kantite} route={k.route} />)}
|
||||
</Grid>
|
||||
</Container>
|
||||
<Container style={{marginTop: '5em', marginBottom: '5em'}} align='center'>
|
||||
@@ -71,20 +71,20 @@ export default function Home({konbyenAwtis, konbyenTeks}) {
|
||||
}
|
||||
|
||||
Home.propTypes = {
|
||||
konbyenAwtis: PropTypes.number.isRequired,
|
||||
konbyenTeks: PropTypes.number.isRequired
|
||||
kantiteAwtis: PropTypes.number.isRequired,
|
||||
kantiteTeks: PropTypes.number.isRequired
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
const awtisResponse = await axios.get(`${process.env.API_URL}/awtis/count`)
|
||||
const teksResponse = await axios.get(`${process.env.API_URL}/teks/count`)
|
||||
const konbyenAwtis = awtisResponse.data
|
||||
const konbyenTeks = teksResponse.data
|
||||
const kantiteAwtis = awtisResponse.data
|
||||
const kantiteTeks = teksResponse.data
|
||||
|
||||
return {
|
||||
props: {
|
||||
konbyenAwtis,
|
||||
konbyenTeks
|
||||
kantiteAwtis,
|
||||
kantiteTeks
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user