2020-12-17 22:34:55 +01:00
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
|
import {useRouter} from 'next/router'
|
2022-05-25 06:38:05 +04:00
|
|
|
import Grid from '@mui/material/Grid'
|
|
|
|
|
import Card from '@mui/material/Card'
|
|
|
|
|
import CardActionArea from '@mui/material/CardActionArea'
|
|
|
|
|
import CardContent from '@mui/material/CardContent'
|
|
|
|
|
import Typography from '@mui/material/Typography'
|
2022-05-23 00:24:49 +04:00
|
|
|
|
|
|
|
|
export default function KatKayLa({tit, kantite, href, as}) {
|
2020-12-17 22:34:55 +01:00
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
return (
|
2022-05-25 06:38:05 +04:00
|
|
|
<Grid item xs={12} md={6}>
|
|
|
|
|
<Card variant='outlined'>
|
2022-05-23 00:24:49 +04:00
|
|
|
<CardActionArea onClick={() => router.push(href, as).then(() => window.scrollTo(0, 0))}>
|
|
|
|
|
<CardContent>
|
2022-05-25 06:38:05 +04:00
|
|
|
<Typography style={{fontWeight: 'bold'}} align='center' variant='h5' component='h4'>
|
2022-05-23 00:24:49 +04:00
|
|
|
{kantite}
|
|
|
|
|
</Typography>
|
2022-05-25 06:38:05 +04:00
|
|
|
<Typography align='center' variant='h6' component='h5'>
|
2022-05-23 03:28:30 +04:00
|
|
|
{tit}
|
|
|
|
|
</Typography>
|
2022-05-23 00:24:49 +04:00
|
|
|
</CardContent>
|
|
|
|
|
</CardActionArea>
|
|
|
|
|
</Card>
|
2022-05-25 06:38:05 +04:00
|
|
|
</Grid>
|
2020-12-17 22:34:55 +01:00
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KatKayLa.propTypes = {
|
|
|
|
|
tit: PropTypes.string.isRequired,
|
2020-12-18 22:01:47 +01:00
|
|
|
kantite: PropTypes.number.isRequired,
|
2022-05-23 00:24:49 +04:00
|
|
|
href: PropTypes.string.isRequired,
|
|
|
|
|
as: PropTypes.string.isRequired
|
2020-12-17 22:34:55 +01:00
|
|
|
}
|