This pattern should be abstracted since it's going to appear in every route that is paginated.