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