import { Link } from "react-router-dom"; import { PagedCollection } from "../interfaces/Collection"; interface PaginationProps { retrieved: PagedCollection | null; } const Pagination = ({retrieved}: PaginationProps) => { const view = retrieved && retrieved["hydra:view"]; if (!view) { return null; } const { "hydra:first": first, "hydra:previous": previous, "hydra:next": next, "hydra:last": last, } = view; return ( ); } export default Pagination;