From 7a1ca5bf4fcae7cc4aff9d17f5d5d45f371078db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Famibelle-Pronzola?= Date: Sat, 22 Jul 2023 13:45:55 +0400 Subject: [PATCH] Update pajinasyon with new awtis route --- components/awtis/pajinasyon.js | 38 ++++++++-------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/components/awtis/pajinasyon.js b/components/awtis/pajinasyon.js index 5439b2d2..e635009 100644 --- a/components/awtis/pajinasyon.js +++ b/components/awtis/pajinasyon.js @@ -1,42 +1,22 @@ +'use client' + import PropTypes from 'prop-types' -import {useRouter} from 'next/router' -import {styled} from '@mui/material/styles' +import {useRouter} from 'next/navigation' import Pagination from '@mui/material/Pagination' -import {Grid} from '@mui/material' - -const PREFIX = 'pajinasyon' - -const classes = { - root: `${PREFIX}-root` -} - -const StyledGrid = styled(Grid)(( - { - theme - } -) => ({ - [`& .${classes.root}`]: { - '& > *': { - marginTop: theme.spacing(2) - } - } -})) +import Grid from '@mui/material/Unstable_Grid2' export default function Pajinasyon({pajTotal, paj}) { const router = useRouter() const handleChange = (event, value) => { - const href = `/awtis?paj&paj=${value}` - const as = `/awtis/paj/${value}` - router.push(href, as) + const href = `/awtis?paj=${value}` + router.push(href) } return ( - -
- -
-
+ + + ) }