@s-ui/react-molecule-pagination
Version:
`MoleculePagination` is a component that displays a range of pages with the current page highlighted and the proper buttons to navigate across the available pages in the entire range of total pages
11 lines • 362 B
JavaScript
/**
* Gets the previous page number taking into account possible compressed mode
* @param {object} params - parameters pagination
* @param {number} params.page - Original page number
* @return {number} previous page number
*/
var prevPage = function prevPage(_ref) {
var page = _ref.page;
return page !== 1 ? page - 1 : null;
};
export default prevPage;