export const calculateMaxPage = ( numResults , resultsPerPage ) => Math . ceil ( numResults / resultsPerPage ) - 1 ; export const calculateHasPrevious = ( page ) => page > 0 ; export const calculateHasNext = ( page , numResults , resultsPerPage ) => page < calculateMaxPage ( numResults , resultsPerPage ) ;