handle pagination in clinics page & change design login & fix bug filter state & change list most searched in home page & handle error page doctor item & change key url doctors and home page and get data from url & send data with url search to doctors page & show pagination only when list is long
This commit is contained in:
@@ -2,13 +2,15 @@ import { Pagination as PaginationMUI } from "@mui/material";
|
||||
|
||||
function Pagination({ page, setPage, list, itemsPerPage }) {
|
||||
const handleChange = (_, value) => setPage(value);
|
||||
const count = list && itemsPerPage ? Math.ceil(list.length / itemsPerPage) : 20;
|
||||
|
||||
return (
|
||||
<PaginationMUI
|
||||
count={list && itemsPerPage ? Math.ceil(list.length / itemsPerPage) : 20}
|
||||
count={count}
|
||||
page={page || 1}
|
||||
onChange={setPage && handleChange}
|
||||
color="primary"
|
||||
className={count < 2 && '!hidden'}
|
||||
sx={{
|
||||
"& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root": {
|
||||
color: "#616161",
|
||||
|
||||
@@ -23,7 +23,7 @@ function Content({
|
||||
};
|
||||
|
||||
const handleFilter = () => {
|
||||
handleSearch('')
|
||||
handleSearch && handleSearch('');
|
||||
handleClose();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user