2
2
3
3
import { useSearchParams } from "next/navigation" ;
4
4
import { useCallback , useEffect , useState } from "react" ;
5
+ import { useDispatch } from "react-redux" ;
5
6
import { checkUrl , setChartJsDefaults , toAda } from "../../utils" ;
6
7
import { Alert , ButtonGroup , Col , Row , Spinner , Stack , Table } from "react-bootstrap" ;
7
8
import { ArcElement , BarElement , CategoryScale , Chart , Legend , LinearScale , Title , Tooltip } from 'chart.js' ;
@@ -12,6 +13,7 @@ import Stake from "../../components/Stake";
12
13
import RawJsonButton from "../../components/RawJsonButton" ;
13
14
import VerifiedBadge from "../../components/VerifiedBadge" ;
14
15
import PoolTicker from "../../components/PoolTicker" ;
16
+ import { updatePoolsForAggregator } from "../../store/poolsSlice" ;
15
17
16
18
Chart . register (
17
19
ArcElement ,
@@ -26,6 +28,7 @@ Chart.register(
26
28
setChartJsDefaults ( Chart ) ;
27
29
28
30
export default function Registrations ( ) {
31
+ const dispatch = useDispatch ( ) ;
29
32
const searchParams = useSearchParams ( ) ;
30
33
const [ isLoading , setIsLoading ] = useState ( true ) ;
31
34
const [ currentError , setCurrentError ] = useState ( undefined ) ;
@@ -75,6 +78,8 @@ export default function Registrations() {
75
78
setCurrentEpoch ( undefined ) ;
76
79
console . error ( "Fetch current epoch in epoch-settings error:" , error ) ;
77
80
} ) ;
81
+
82
+ dispatch ( updatePoolsForAggregator ( aggregator ) ) ;
78
83
} else {
79
84
setCurrentError ( error ) ;
80
85
}
0 commit comments