feat: buildPaginationUrl helper to simplify code (#1056)