2023-07-22 13:45:55 +04:00
|
|
|
'use client'
|
|
|
|
|
|
2020-12-11 01:39:21 +01:00
|
|
|
import PropTypes from 'prop-types'
|
2023-07-22 13:45:55 +04:00
|
|
|
import {useRouter} from 'next/navigation'
|
2022-01-19 07:06:26 +04:00
|
|
|
import Pagination from '@mui/material/Pagination'
|
2026-04-21 19:31:26 +04:00
|
|
|
import Grid from '@mui/material/Grid'
|
2020-12-11 01:39:21 +01:00
|
|
|
|
|
|
|
|
export default function Pajinasyon({pajTotal, paj}) {
|
|
|
|
|
const router = useRouter()
|
2022-01-19 06:35:04 +04:00
|
|
|
|
2020-12-11 01:39:21 +01:00
|
|
|
const handleChange = (event, value) => {
|
2023-07-22 13:45:55 +04:00
|
|
|
const href = `/awtis?paj=${value}`
|
|
|
|
|
router.push(href)
|
2020-12-11 01:39:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
2026-04-21 19:31:26 +04:00
|
|
|
<Grid container sx={{marginTop: 10, marginBottom: 3, justifyContent: 'center'}}>
|
2023-07-22 13:45:55 +04:00
|
|
|
<Pagination size='small' page={paj} count={pajTotal} color='primary' onChange={handleChange} />
|
|
|
|
|
</Grid>
|
2020-12-11 01:39:21 +01:00
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Pajinasyon.propTypes = {
|
|
|
|
|
pajTotal: PropTypes.number.isRequired,
|
|
|
|
|
paj: PropTypes.number.isRequired
|
|
|
|
|
}
|