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,
|
2022-01-22 14:49:46 +04:00
|
|
|
Box
|
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}}>
|
2022-01-22 14:49:46 +04:00
|
|
|
<Box sx={{
|
|
|
|
|
width: 100,
|
|
|
|
|
padding: 1,
|
|
|
|
|
border: '1px solid rgba(76, 175, 80, 0.5)',
|
|
|
|
|
color: 'rgb(76, 175, 80)',
|
|
|
|
|
borderRadius: '4px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
}} onClick={() => router.push(route).then(() => window.scrollTo(0, 0))}
|
|
|
|
|
>
|
2022-01-22 13:41:01 +04:00
|
|
|
{kantite} <br /> {tit}
|
2022-01-22 14:49:46 +04:00
|
|
|
</Box>
|
2022-01-22 13:41:01 +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,
|
2020-12-17 22:34:55 +01:00
|
|
|
route: PropTypes.string.isRequired
|
|
|
|
|
}
|