import { memo } from 'react' import { USERS_PAGE_LIMIT } from 'data/auth/users-query' import { Button } from 'ui' interface UsersPaginationProps { total: number page: number setPage: (page: number) => void isFetchingNextPage: boolean } const UsersPagination = ({ total, page, setPage, isFetchingNextPage }: UsersPaginationProps) => { const startRowFromPage = USERS_PAGE_LIMIT * (page - 1) + 1 const fromRow = startRowFromPage > total ? total : startRowFromPage const endRowFromPage = USERS_PAGE_LIMIT * page const toRow = endRowFromPage > total ? total : endRowFromPage const hasPrevious = page > 1 const hasNext = toRow < total return ( ) } export default UsersPagination