Move settings from store to another context

This commit is contained in:
Alejandro Celaya
2023-07-23 18:30:59 +02:00
parent dddbc232c2
commit b3122219be
37 changed files with 293 additions and 263 deletions

View File

@@ -66,12 +66,14 @@ export const selectServerListener = (
) => {
const listener = createListenerMiddleware();
listener.startListening({
actionCreator: selectServerThunk.fulfilled,
effect: ({ payload }, { dispatch }) => {
isReachableServer(payload) && dispatch(loadMercureInfo());
},
});
// TODO Find a way for the mercure info to be re-loaded when server changes, without leaking mercure implementation
// details
// listener.startListening({
// actionCreator: selectServerThunk.fulfilled,
// effect: ({ payload }, { dispatch }) => {
// isReachableServer(payload) && dispatch(loadMercureInfo());
// },
// });
return listener;
};