diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea7580709..3da4127593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- [#2564](https://github.com/poanetwork/blockscout/pull/2564) - fix first page button for uncles and reorgs - [#2563](https://github.com/poanetwork/blockscout/pull/2563) - Fix view less transfers button ### Chore diff --git a/apps/block_scout_web/assets/js/lib/async_listing_load.js b/apps/block_scout_web/assets/js/lib/async_listing_load.js index 1c1fec4baa..13c4aa7da2 100644 --- a/apps/block_scout_web/assets/js/lib/async_listing_load.js +++ b/apps/block_scout_web/assets/js/lib/async_listing_load.js @@ -205,7 +205,16 @@ export const elements = { } $el.show() $el.attr('disabled', false) - $el.attr('href', window.location.href.split('?')[0]) + + const urlParams = new URLSearchParams(window.location.search) + const blockParam = urlParams.get('block_type') + const firstPageHref = window.location.href.split('?')[0] + + if (blockParam !== null) { + $el.attr('href', firstPageHref + '?block_type=' + blockParam) + } else { + $el.attr('href', firstPageHref) + } } }, '[data-async-listing] [data-page-number]': {