mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
add setupListeners to the redux store (#70953)
This commit is contained in:
parent
280f259f73
commit
09330890f3
@ -1,4 +1,5 @@
|
||||
import { configureStore as reduxConfigureStore, createListenerMiddleware } from '@reduxjs/toolkit';
|
||||
import { setupListeners } from '@reduxjs/toolkit/query';
|
||||
|
||||
import { browseDashboardsAPI } from 'app/features/browse-dashboards/api/browseDashboardsAPI';
|
||||
import { publicDashboardApi } from 'app/features/dashboard/api/publicDashboardApi';
|
||||
@ -36,6 +37,9 @@ export function configureStore(initialState?: Partial<StoreState>) {
|
||||
},
|
||||
});
|
||||
|
||||
// this enables "refetchOnFocus" and "refetchOnReconnect" for RTK Query
|
||||
setupListeners(store.dispatch);
|
||||
|
||||
setStore(store);
|
||||
return store;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user