Skip to content

Commit 0418a50

Browse files
Damien LACHAUME / PALO-ITAlenar
authored andcommitted
Update pools on Registrations page
1 parent f8f6a51 commit 0418a50

File tree

1 file changed

+5
-0
lines changed
  • mithril-explorer/src/app/registrations

1 file changed

+5
-0
lines changed

mithril-explorer/src/app/registrations/page.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import {useSearchParams} from "next/navigation";
44
import {useCallback, useEffect, useState} from "react";
5+
import {useDispatch} from "react-redux";
56
import {checkUrl, setChartJsDefaults, toAda} from "../../utils";
67
import {Alert, ButtonGroup, Col, Row, Spinner, Stack, Table} from "react-bootstrap";
78
import {ArcElement, BarElement, CategoryScale, Chart, Legend, LinearScale, Title, Tooltip} from 'chart.js';
@@ -12,6 +13,7 @@ import Stake from "../../components/Stake";
1213
import RawJsonButton from "../../components/RawJsonButton";
1314
import VerifiedBadge from "../../components/VerifiedBadge";
1415
import PoolTicker from "../../components/PoolTicker";
16+
import {updatePoolsForAggregator} from "../../store/poolsSlice";
1517

1618
Chart.register(
1719
ArcElement,
@@ -26,6 +28,7 @@ Chart.register(
2628
setChartJsDefaults(Chart);
2729

2830
export default function Registrations() {
31+
const dispatch = useDispatch();
2932
const searchParams = useSearchParams();
3033
const [isLoading, setIsLoading] = useState(true);
3134
const [currentError, setCurrentError] = useState(undefined);
@@ -75,6 +78,8 @@ export default function Registrations() {
7578
setCurrentEpoch(undefined);
7679
console.error("Fetch current epoch in epoch-settings error:", error);
7780
});
81+
82+
dispatch(updatePoolsForAggregator(aggregator));
7883
} else {
7984
setCurrentError(error);
8085
}

0 commit comments

Comments
 (0)