import React from "react"; import { usePagination } from "react-use-pagination"; import adapters from "../../static/adapters.json"; import { useFilteredObjs } from "../libs/store"; import Card from "./Card"; import Paginate from "./Paginate"; export default function Adapter(): JSX.Element { const { filter, setFilter, filteredObjs: filteredAdapters, } = useFilteredObjs(adapters); const props = usePagination({ totalItems: filteredAdapters.length, initialPageSize: 10, }); const { startIndex, endIndex } = props; const currentAdapters = filteredAdapters.slice(startIndex, endIndex + 1); return ( <>