diff --git a/mithril-explorer/package.json b/mithril-explorer/package.json index c0de2b71b14..4175b470e5f 100644 --- a/mithril-explorer/package.json +++ b/mithril-explorer/package.json @@ -1,6 +1,6 @@ { "name": "mithril-explorer", - "version": "0.4.5", + "version": "0.4.6", "private": true, "scripts": { "dev": "next dev", diff --git a/mithril-explorer/src/app/page.js b/mithril-explorer/src/app/page.js index 609960580b0..c80970a2c29 100644 --- a/mithril-explorer/src/app/page.js +++ b/mithril-explorer/src/app/page.js @@ -60,18 +60,21 @@ export default function Explorer() { } dispatch(updatePoolsForAggregator(selectedAggregator)); - }, [selectedAggregator, router, searchParams, dispatch]); + }, [selectedAggregator]); // eslint-disable-line react-hooks/exhaustive-deps // Allow navigation to work (previous, next) useEffect(() => { - if (isUpdatingAggregatorInUrl) { - setIsUpdatingAggregatorInUrl(false); - } else { - const aggregatorInUrl = searchParams.get("aggregator"); + function allowNavigation() { + if (isUpdatingAggregatorInUrl) { + setIsUpdatingAggregatorInUrl(false); + } else { + const aggregatorInUrl = searchParams.get("aggregator"); - dispatch(selectAggregator(aggregatorInUrl)); + dispatch(selectAggregator(aggregatorInUrl)); + } } - }, [searchParams, dispatch, isUpdatingAggregatorInUrl]); + allowNavigation(); + }, [searchParams]); // eslint-disable-line react-hooks/exhaustive-deps return ( diff --git a/mithril-explorer/src/app/registrations/page.js b/mithril-explorer/src/app/registrations/page.js index 925a26a9863..f9354911fc5 100644 --- a/mithril-explorer/src/app/registrations/page.js +++ b/mithril-explorer/src/app/registrations/page.js @@ -90,7 +90,7 @@ export default function Registrations() { } else { setCurrentError(error); } - }, [searchParams, dispatch]); + }, [searchParams]); // eslint-disable-line react-hooks/exhaustive-deps function getNoRegistrationsMessage() { if (currentEpoch === registrationEpoch) {