import { Pagination } from "react-bootstrap"; import React from 'react'; function Paginations({ index, totalPages, handlePage }) { return ( handlePage(1)} /> {index === 1 ? : handlePage(index - 1)} />} {index === totalPages && index > 4 ? handlePage(index - 4)}>{index - 4} : ""} {index > 3 && index >= totalPages-1 ? handlePage(index - 3)}>{index - 3} : ""} {index < 3 ? "" : handlePage(index - 2)}>{index - 2}} {index === 1 ? "" : handlePage(index - 1)}>{index - 1}} {index} {index === totalPages ? "" : handlePage(index + 1)}>{index + 1}} {index > totalPages-2 ? "" : handlePage(index + 2)}>{index + 2}} {index <= totalPages-3 && index < 3 ? handlePage(index + 3)}>{index + 3} : ""} {index <= totalPages-4 && index < 2 ? handlePage(index + 4)}>{index + 4} : ""} {index === totalPages ? : handlePage(index + 1)} />} handlePage(totalPages)} /> ) } export default Paginations