cuatomer table done
This commit is contained in:
parent
0f2bcb30bf
commit
1fb812f162
@ -35,9 +35,9 @@ const _nav = [
|
||||
},
|
||||
{
|
||||
component: CNavItem,
|
||||
name: "Users",
|
||||
name: "Customers",
|
||||
icon: <CIcon icon={cilTennisBall} customClassName="nav-icon" />,
|
||||
to: "/users-address",
|
||||
to: "/customers-details",
|
||||
},
|
||||
// {
|
||||
// component: CNavItem,
|
||||
|
@ -91,10 +91,10 @@ import EditTermsConditions from "./views/Content/editTermsConditions";
|
||||
import EditShippingPolicy from "./views/Content/editShippingPolicy";
|
||||
import EditRefundpolicy from "./views/Content/editRefundPolicy";
|
||||
|
||||
import UserTable from "./views/UserAddress/userTable";
|
||||
import EditUserAddress from "./views/UserAddress/editUserAddress";
|
||||
import AddUserAddress from "./views/UserAddress/addUserAddress";
|
||||
import ViewAddress from "./views/UserAddress/viewAddress";
|
||||
import UserTable from "./views/customerDetails/userTable";
|
||||
// import EditUserAddress from "./views/customerDetails/editUserAddress";
|
||||
// import AddUserAddress from "./views/customerDetails/addUserAddress";
|
||||
import viewDetails from "./views/customerDetails/viewDetails";
|
||||
import Design from "./views/Design/design";
|
||||
import Banners from "./views/Banner/banner";
|
||||
import RegisterImage from "./views/Images/RegisterImage";
|
||||
@ -118,6 +118,7 @@ import EditTestimonial from "./views/Testimonials/EditTestimonial";
|
||||
//Blogs
|
||||
import Blogs from "./views/Blog/Blogs";
|
||||
import CreateBlog from "./views/Blog/CreateBlog";
|
||||
import users from "./views/Users/users";
|
||||
const routes = [
|
||||
{ path: "/", exact: true, name: "Home" },
|
||||
{
|
||||
@ -158,24 +159,24 @@ const routes = [
|
||||
},
|
||||
|
||||
{
|
||||
path: "/users-address",
|
||||
path: "/customers-details",
|
||||
name: "User Table",
|
||||
element: UserTable,
|
||||
},
|
||||
// {
|
||||
// path: "/users-address/add",
|
||||
// name: "User Address",
|
||||
// element: AddUserAddress,
|
||||
// },
|
||||
// {
|
||||
// path: "/users-address/edit/:id",
|
||||
// name: "Edit user address",
|
||||
// element: EditUserAddress,
|
||||
// },
|
||||
{
|
||||
path: "/users-address/add",
|
||||
name: "User Address",
|
||||
element: AddUserAddress,
|
||||
},
|
||||
{
|
||||
path: "/users-address/edit/:id",
|
||||
name: "Edit user address",
|
||||
element: EditUserAddress,
|
||||
},
|
||||
{
|
||||
path: "/users-address/view/:id",
|
||||
path: "/users-address/view",
|
||||
name: "view address",
|
||||
element: ViewAddress,
|
||||
element: viewDetails,
|
||||
},
|
||||
|
||||
// health care providers
|
||||
|
@ -1,153 +1,142 @@
|
||||
|
||||
import axios from "axios";
|
||||
import React, { useEffect, useState, useCallback, useMemo } from "react";
|
||||
import Pagination from "./Pagination";
|
||||
import { Link } from "react-router-dom";
|
||||
import swal from 'sweetalert';
|
||||
import swal from "sweetalert";
|
||||
// import { API } from "../../data";
|
||||
import { isAutheticated } from "../../auth";
|
||||
|
||||
function users() {
|
||||
const [users, setUsers] = useState([])
|
||||
const [users, setUsers] = useState([]);
|
||||
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const [userPerPage] = useState(10);
|
||||
const token = isAutheticated();
|
||||
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const [userPerPage] = useState(10);
|
||||
const token = isAutheticated();
|
||||
const getAllUsers = useCallback(async () => {
|
||||
let res = await axios.get(`/api/v1/admin/users`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
// console.log(res.data)
|
||||
setUsers(res.data.users);
|
||||
}, [token]);
|
||||
|
||||
const getAllUsers = useCallback(async () => {
|
||||
let res = await axios.get(
|
||||
`/api/v1/admin/users`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log(res.data)
|
||||
setUsers(res.data.users)
|
||||
useEffect(() => {
|
||||
getAllUsers();
|
||||
}, [getAllUsers]);
|
||||
|
||||
// console.log(cmsRes)
|
||||
|
||||
}, [token]);
|
||||
// Get current posts
|
||||
//pagination
|
||||
const indexOfLastUser = currentPage * userPerPage;
|
||||
const indexOfFirstUser = indexOfLastUser - userPerPage;
|
||||
const currentUser = users.slice(indexOfFirstUser, indexOfLastUser);
|
||||
|
||||
useEffect(() => {
|
||||
getAllUsers();
|
||||
}, [getAllUsers]);
|
||||
// Change page
|
||||
const paginate = (pageNumber) => setCurrentPage(pageNumber);
|
||||
|
||||
//change time formate
|
||||
function formatAMPM(date) {
|
||||
var hours = new Date(date).getHours();
|
||||
var minutes = new Date(date).getMinutes();
|
||||
var ampm = hours >= 12 ? "PM" : "AM";
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||
minutes = minutes < 10 ? "0" + minutes : minutes;
|
||||
var strTime = hours + ":" + minutes + " " + ampm;
|
||||
return strTime;
|
||||
}
|
||||
|
||||
// console.log(cmsRes)
|
||||
|
||||
// Get current posts
|
||||
//pagination
|
||||
const indexOfLastUser = currentPage * userPerPage;
|
||||
const indexOfFirstUser = indexOfLastUser - userPerPage;
|
||||
const currentUser = users.slice(indexOfFirstUser, indexOfLastUser);
|
||||
|
||||
// Change page
|
||||
const paginate = pageNumber => setCurrentPage(pageNumber);
|
||||
|
||||
//change time formate
|
||||
function formatAMPM(date) {
|
||||
var hours = new Date(date).getHours();
|
||||
var minutes = new Date(date).getMinutes();
|
||||
var ampm = hours >= 12 ? 'PM' : 'AM';
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||
minutes = minutes < 10 ? '0' + minutes : minutes;
|
||||
var strTime = hours + ':' + minutes + ' ' + ampm;
|
||||
return strTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className=" main-content">
|
||||
<div className=" my-3 page-content">
|
||||
<div className="container-fluid">
|
||||
{/* <!-- start page title --> */}
|
||||
<div className="row">
|
||||
<div className="col-12">
|
||||
<div className="page-title-box d-flex align-items-center justify-content-between">
|
||||
<h4 className="mb-3">CMP - All Users</h4>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* <!-- end page title --> */}
|
||||
|
||||
<div className="row">
|
||||
<div className="col-lg-12">
|
||||
<div className="card">
|
||||
<div className="card-body">
|
||||
<div className="row ml-0 mr-0 mb-10">
|
||||
|
||||
</div>
|
||||
<div className="table-responsive table-shoot">
|
||||
<table className="table table-centered table-nowrap mb-0">
|
||||
<thead className="thead-light">
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
<th>email</th>
|
||||
<th>Profile Image</th>
|
||||
<th>Phone No.</th>
|
||||
<th>Register At</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{currentUser && currentUser.map((item, index) =>
|
||||
<tr>
|
||||
|
||||
<td>{item?.name}</td>
|
||||
<td>{item?.email}</td>
|
||||
<td>
|
||||
<img src={`${item.avatar?.url}`} width="50" alt="" />
|
||||
</td>
|
||||
<td>{item?.phone}</td>
|
||||
|
||||
|
||||
<td>
|
||||
|
||||
{new Date(`${item?.createdAt}`).toDateString()}<span> , {`${formatAMPM(item?.createdAt)}`}</span>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<Link to={`/users/view/${item._id}`}>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
className="mt-1 btn btn-info btn-sm waves-effect waves-light btn-table ml-2"
|
||||
>
|
||||
View
|
||||
</button>
|
||||
</Link>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/* <!-- end table-responsive --> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* <!-- container-fluid --> */}
|
||||
return (
|
||||
<>
|
||||
<div className=" main-content">
|
||||
<div className=" my-3 page-content">
|
||||
<div className="container-fluid">
|
||||
{/* <!-- start page title --> */}
|
||||
<div className="row">
|
||||
<div className="col-12">
|
||||
<div className="page-title-box d-flex align-items-center justify-content-between">
|
||||
<h4 className="mb-3"> All Customers</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Pagination userPerPage={userPerPage}
|
||||
totalUsers={users.length}
|
||||
paginate={paginate} />
|
||||
</>
|
||||
);
|
||||
{/* <!-- end page title --> */}
|
||||
|
||||
<div className="row">
|
||||
<div className="col-lg-12">
|
||||
<div className="card">
|
||||
<div className="card-body">
|
||||
<div className="row ml-0 mr-0 mb-10"></div>
|
||||
<div className="table-responsive table-shoot">
|
||||
<table className="table table-centered table-nowrap mb-0">
|
||||
<thead className="thead-light">
|
||||
<tr>
|
||||
<th>Customer Name</th>
|
||||
<th>Unique Id </th>
|
||||
{/* <th>Profile Image</th> */}
|
||||
|
||||
<th>Date Registered</th>
|
||||
<th>Last Purchase</th>
|
||||
<th>Orders</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{currentUser &&
|
||||
currentUser.map((item, index) => (
|
||||
<tr>
|
||||
<td>{item?.name}</td>
|
||||
<td>{item?._id}</td>
|
||||
{/* <td>
|
||||
<img src={`${item.avatar?.url}`} width="50" alt="" />
|
||||
</td> */}
|
||||
|
||||
<td>
|
||||
{new Date(
|
||||
`${item?.createdAt}`
|
||||
).toDateString()}
|
||||
<span>
|
||||
{" "}
|
||||
, {`${formatAMPM(item?.createdAt)}`}
|
||||
</span>
|
||||
</td>
|
||||
<td>last Purchase</td>
|
||||
<td>order count </td>
|
||||
|
||||
<td>
|
||||
<Link to={`/users/view/${item._id}`}>
|
||||
<button
|
||||
type="button"
|
||||
className="mt-1 btn btn-info btn-sm waves-effect waves-light btn-table ml-2"
|
||||
>
|
||||
View
|
||||
</button>
|
||||
</Link>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/* <!-- end table-responsive --> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* <!-- container-fluid --> */}
|
||||
</div>
|
||||
</div>
|
||||
<Pagination
|
||||
userPerPage={userPerPage}
|
||||
totalUsers={users.length}
|
||||
paginate={paginate}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default users;
|
||||
|
56
src/views/customerDetails/orderDetails.js
Normal file
56
src/views/customerDetails/orderDetails.js
Normal file
@ -0,0 +1,56 @@
|
||||
import axios from "axios";
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { isAutheticated } from "src/auth";
|
||||
|
||||
const OrderDetails = ({ _id, setLoading1 }) => {
|
||||
const token = isAutheticated();
|
||||
const [userOrder, setUserOrder] = useState();
|
||||
// const [loading, setLoading] = useState(true);
|
||||
|
||||
const getOrders = async () => {
|
||||
try {
|
||||
const response = await axios.get(`/api/v1/admin/users/orders/${_id}`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
setUserOrder(response.data.order);
|
||||
setLoading1(false);
|
||||
} catch (error) {
|
||||
console.error("Error fetching orders:", error);
|
||||
// setLoading1(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getOrders();
|
||||
}, [_id]);
|
||||
console.log(userOrder, "userOrder");
|
||||
|
||||
// if (loading) {
|
||||
// return <div>Loading...</div>;
|
||||
// }
|
||||
|
||||
return (
|
||||
<>
|
||||
<td className="text-start">
|
||||
{userOrder?.length > 0
|
||||
? new Date(userOrder[0]?.createdAt).toLocaleString("en-IN", {
|
||||
weekday: "short",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
hour12: true,
|
||||
})
|
||||
: "No Purchase"}
|
||||
</td>
|
||||
<td className="text-start">
|
||||
{userOrder?.length > 0 ? userOrder?.length : "No Order"}
|
||||
</td>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default OrderDetails;
|
@ -17,32 +17,34 @@ import {
|
||||
import SearchIcon from "@mui/icons-material/Search";
|
||||
import Fuse from "fuse.js";
|
||||
import { Typography } from "@material-ui/core";
|
||||
import OrderDetails from "./orderDetails";
|
||||
const UserTable = () => {
|
||||
const token = isAutheticated();
|
||||
const [query, setQuery] = useState("");
|
||||
const navigate = useNavigate();
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [loading1, setLoading1] = useState(true);
|
||||
const [success, setSuccess] = useState(true);
|
||||
const [userAddress, setUserAddress] = useState([]);
|
||||
const [users, setUsers] = useState([]);
|
||||
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const [itemPerPage, setItemPerPage] = useState(10);
|
||||
const [showData, setShowData] = useState(userAddress);
|
||||
const [showData, setShowData] = useState(users);
|
||||
|
||||
const handleShowEntries = (e) => {
|
||||
setCurrentPage(1);
|
||||
setItemPerPage(e.target.value);
|
||||
};
|
||||
|
||||
const getUserAddressess = async () => {
|
||||
const getUsers = async () => {
|
||||
axios
|
||||
.get(`/api/user-address/getAddressess`, {
|
||||
.get(`/api/v1/admin/users`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
setUserAddress(res.data?.userAddress);
|
||||
setUsers(res.data.users);
|
||||
setLoading(false);
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -58,57 +60,58 @@ const UserTable = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getUserAddressess();
|
||||
getUsers();
|
||||
}, [success]);
|
||||
console.log(userAddress);
|
||||
console.log(users);
|
||||
|
||||
useEffect(() => {
|
||||
const loadData = () => {
|
||||
const indexOfLastPost = currentPage * itemPerPage;
|
||||
const indexOfFirstPost = indexOfLastPost - itemPerPage;
|
||||
setShowData(userAddress.slice(indexOfFirstPost, indexOfLastPost));
|
||||
setShowData(users.slice(indexOfFirstPost, indexOfLastPost));
|
||||
};
|
||||
loadData();
|
||||
}, [currentPage, itemPerPage, userAddress]);
|
||||
}, [currentPage, itemPerPage, users]);
|
||||
console.log(users);
|
||||
|
||||
const handleDelete = (id) => {
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
icon: "error",
|
||||
buttons: {
|
||||
Yes: { text: "Yes", value: true },
|
||||
Cancel: { text: "Cancel", value: "cancel" },
|
||||
},
|
||||
}).then((value) => {
|
||||
if (value === true) {
|
||||
axios
|
||||
.delete(`/api/user-address/deleteAddress/${id}`, {
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
swal({
|
||||
title: "Deleted",
|
||||
text: "Address Deleted successfully!",
|
||||
icon: "success",
|
||||
button: "ok",
|
||||
});
|
||||
setSuccess((prev) => !prev);
|
||||
})
|
||||
.catch((err) => {
|
||||
swal({
|
||||
title: "Warning",
|
||||
text: "Something went wrong!",
|
||||
icon: "error",
|
||||
button: "Retry",
|
||||
dangerMode: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
// const handleDelete = (id) => {
|
||||
// swal({
|
||||
// title: "Are you sure?",
|
||||
// icon: "error",
|
||||
// buttons: {
|
||||
// Yes: { text: "Yes", value: true },
|
||||
// Cancel: { text: "Cancel", value: "cancel" },
|
||||
// },
|
||||
// }).then((value) => {
|
||||
// if (value === true) {
|
||||
// axios
|
||||
// .delete(`/api/user-address/deleteAddress/${id}`, {
|
||||
// headers: {
|
||||
// "Access-Control-Allow-Origin": "*",
|
||||
// Authorization: `Bearer ${token}`,
|
||||
// },
|
||||
// })
|
||||
// .then((res) => {
|
||||
// swal({
|
||||
// title: "Deleted",
|
||||
// text: "Address Deleted successfully!",
|
||||
// icon: "success",
|
||||
// button: "ok",
|
||||
// });
|
||||
// setSuccess((prev) => !prev);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// swal({
|
||||
// title: "Warning",
|
||||
// text: "Something went wrong!",
|
||||
// icon: "error",
|
||||
// button: "Retry",
|
||||
// dangerMode: true,
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
return (
|
||||
<div className="main-content">
|
||||
@ -125,10 +128,10 @@ const UserTable = () => {
|
||||
"
|
||||
>
|
||||
<div style={{ fontSize: "22px" }} className="fw-bold">
|
||||
Users
|
||||
All Customers
|
||||
</div>
|
||||
|
||||
<div className="page-title-right">
|
||||
{/* <div className="page-title-right">
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
@ -143,7 +146,7 @@ const UserTable = () => {
|
||||
>
|
||||
Add User
|
||||
</Button>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -188,12 +191,14 @@ const UserTable = () => {
|
||||
style={{ background: "rgb(140, 213, 213)" }}
|
||||
>
|
||||
<tr>
|
||||
<th className="text-start">Id</th>
|
||||
<th className="text-start">User Name</th>
|
||||
<th className="text-start">Email</th>
|
||||
<th>Customer Name</th>
|
||||
<th>Unique Id </th>
|
||||
{/* <th>Profile Image</th> */}
|
||||
|
||||
<th className="text-start">Added On</th>
|
||||
<th className="text-start">Actions</th>
|
||||
<th>Date Registered</th>
|
||||
<th>Last Purchase</th>
|
||||
<th>Orders</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -211,32 +216,40 @@ const UserTable = () => {
|
||||
</td>
|
||||
</tr>
|
||||
) : (
|
||||
showData.map((userAddress, i) => {
|
||||
showData.map((user, i) => {
|
||||
return (
|
||||
<tr key={i}>
|
||||
<td>{userAddress._id}</td>
|
||||
<td className="text-start">
|
||||
{userAddress.name}
|
||||
</td>
|
||||
<td className="text-start">
|
||||
{userAddress.email}
|
||||
</td>
|
||||
<td className="text-start">{user.name}</td>
|
||||
<td>{user._id}</td>
|
||||
|
||||
<td className="text-start">
|
||||
{new Date(
|
||||
userAddress.createdAt
|
||||
).toLocaleString("en-IN", {
|
||||
weekday: "short",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
hour12: true,
|
||||
})}
|
||||
{new Date(user.createdAt).toLocaleString(
|
||||
"en-IN",
|
||||
{
|
||||
weekday: "short",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
hour12: true,
|
||||
}
|
||||
)}
|
||||
</td>
|
||||
{loading1 && (
|
||||
<>
|
||||
<td className="text-start">loading...</td>
|
||||
<td className="text-start">loading...</td>
|
||||
</>
|
||||
)}
|
||||
|
||||
<OrderDetails
|
||||
_id={user?._id}
|
||||
setLoading1={setLoading1}
|
||||
/>
|
||||
|
||||
<td className="text-start">
|
||||
<Link
|
||||
{/* <Link
|
||||
to={`/users-address/view/${userAddress._id}`}
|
||||
>
|
||||
<button
|
||||
@ -299,6 +312,14 @@ const UserTable = () => {
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</Link> */}
|
||||
<Link to={`/users/view/${user._id}`}>
|
||||
<button
|
||||
type="button"
|
||||
className="mt-1 btn btn-info btn-sm waves-effect waves-light btn-table ml-2"
|
||||
>
|
||||
View
|
||||
</button>
|
||||
</Link>
|
||||
</td>
|
||||
</tr>
|
||||
@ -318,11 +339,8 @@ const UserTable = () => {
|
||||
aria-live="polite"
|
||||
>
|
||||
Showing {currentPage * itemPerPage - itemPerPage + 1} to{" "}
|
||||
{Math.min(
|
||||
currentPage * itemPerPage,
|
||||
userAddress.length
|
||||
)}{" "}
|
||||
of {userAddress.length} entries
|
||||
{Math.min(currentPage * itemPerPage, users.length)} of{" "}
|
||||
{users.length} entries
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -370,7 +388,7 @@ const UserTable = () => {
|
||||
|
||||
{!(
|
||||
(currentPage + 1) * itemPerPage - itemPerPage >
|
||||
userAddress.length - 1
|
||||
users.length - 1
|
||||
) && (
|
||||
<li className="paginate_button page-item ">
|
||||
<span
|
||||
@ -389,7 +407,7 @@ const UserTable = () => {
|
||||
className={
|
||||
!(
|
||||
(currentPage + 1) * itemPerPage - itemPerPage >
|
||||
userAddress.length - 1
|
||||
users.length - 1
|
||||
)
|
||||
? "paginate_button page-item next"
|
||||
: "paginate_button page-item next disabled"
|
Loading…
Reference in New Issue
Block a user