This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
const displayItem = (currentPage: number, maxPerPage: number, index:number): boolean => { | |
const currentPageStart = ((currentPage - 1) * maxPerPage) + 1; | |
const currentPageEnd = currentPage * maxPerPage; | |
if ((index + 1) >= currentPageStart && (index + 1) <= currentPageEnd ) { | |
return true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useState} from "react"; | |
import Container from "react-bootstrap/Container"; | |
import Row from "react-bootstrap/Row"; | |
import Col from "react-bootstrap/Col"; | |
import { usePagination } from "./paginationhook"; | |
import "bootstrap/dist/css/bootstrap.min.css"; | |
import Paginator from "./Paginator"; | |
function App() { |
NewerOlder