2020-12-17 22:34:55 +01:00
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
|
import {useRouter} from 'next/router'
|
|
|
|
|
import {
|
2022-01-22 13:41:01 +04:00
|
|
|
Grid,
|
|
|
|
|
Button
|
2022-01-19 07:06:26 +04:00
|
|
|
} from '@mui/material'
|
2020-12-17 22:34:55 +01:00
|
|
|
|
2022-01-22 13:41:01 +04:00
|
|
|
export default function KatKayLa({tit, kantite, route}) {
|
2020-12-17 22:34:55 +01:00
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
return (
|
2022-01-22 13:41:01 +04:00
|
|
|
<Grid item sx={{marginTop: 1}}>
|
|
|
|
|
<Button sx={{width: 100}} variant='outlined' onClick={() => router.push(route).then(() => window.scrollTo(0, 0))}>
|
|
|
|
|
{kantite} <br /> {tit}
|
|
|
|
|
</Button>
|
|
|
|
|
</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,
|
2020-12-17 22:34:55 +01:00
|
|
|
route: PropTypes.string.isRequired
|
|
|
|
|
}
|