2020-12-17 22:34:55 +01:00
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
|
import {useRouter} from 'next/router'
|
|
|
|
|
import {
|
2022-05-23 00:24:49 +04:00
|
|
|
Card,
|
|
|
|
|
CardContent,
|
|
|
|
|
CardActionArea,
|
|
|
|
|
Typography,
|
|
|
|
|
Grid
|
2022-01-19 07:06:26 +04:00
|
|
|
} from '@mui/material'
|
2022-05-23 00:24:49 +04:00
|
|
|
import {styled} from '@mui/material/styles'
|
2020-12-17 22:34:55 +01:00
|
|
|
|
2022-05-23 00:24:49 +04:00
|
|
|
const PREFIX = 'kat-kay-la'
|
|
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
|
root: `${PREFIX}-root`,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const StyledGrid = styled(Grid)({
|
|
|
|
|
[`& .${classes.root}`]: {
|
|
|
|
|
minWidth: 275
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default function KatKayLa({tit, kantite, href, as}) {
|
2020-12-17 22:34:55 +01:00
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
return (
|
2022-05-23 00:24:49 +04:00
|
|
|
<StyledGrid item xs={12} md={6}>
|
|
|
|
|
<Card className={classes.root} variant='outlined'>
|
|
|
|
|
<CardActionArea onClick={() => router.push(href, as).then(() => window.scrollTo(0, 0))}>
|
|
|
|
|
<CardContent>
|
|
|
|
|
<Typography style={{display: 'flex', justifyContent: 'center', alignItems: 'center'}} align='center' variant='h4' component='h1'>
|
|
|
|
|
{tit}
|
|
|
|
|
</Typography>
|
|
|
|
|
<Typography gutterBottom style={{fontWeight: 'bold'}} align='center' variant='h5' component='h2'>
|
|
|
|
|
{kantite}
|
|
|
|
|
</Typography>
|
|
|
|
|
</CardContent>
|
|
|
|
|
</CardActionArea>
|
|
|
|
|
</Card>
|
|
|
|
|
</StyledGrid>
|
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
|
|
|
}
|