Skip to content

Instantly share code, notes, and snippets.

View marcosdeaguiar's full-sized avatar

Marcos de Aguiar marcosdeaguiar

  • Salvador - Bahia - Brazil
View GitHub Profile
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;
}
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() {