import { Pagination } from "react-bootstrap"; import React from 'react'; function Paginations(props) { // console.log(props) // const [index, setIndex] = useState(1); return ( props.handlePage(1)} /> {props.index === 1 ? props.handlePage(props.index)} /> : props.handlePage(props.index - 1)} />} {props.index === props.endPage-1 ? props.handlePage(props.index - 3)}>{props.index - 3} : ""} {props.index === props.endPage ? props.handlePage(props.index - 4)}>{props.index - 4} : ""} {props.index === props.endPage ? props.handlePage(props.index - 3)}>{props.index - 3} : ""} {props.index < 3 ? "" : props.handlePage(props.index - 2)}>{props.index - 2}} {props.index === 1 ? "" : props.handlePage(props.index - 1)}>{props.index - 1}} {props.index} {props.index === props.endPage ? "" : props.handlePage(props.index + 1)}>{props.index + 1}} {props.index > props.endPage-2 ? "" : props.handlePage(props.index + 2)}>{props.index + 2}} {props.index === 1 ? props.handlePage(props.index + 3)}>{props.index + 3} : ""} {props.index === 1 ? props.handlePage(props.index + 4)}>{props.index + 4} : ""} {props.index === 2 ? props.handlePage(props.index + 3)}>{props.index + 3} : ""} {props.index === props.endPage ? props.handlePage(props.index)} /> : props.handlePage(props.index + 1)} />} props.handlePage(props.endPage)} /> ) } export default Paginations