Extract shlink-web-component outside of src folder

This commit is contained in:
Alejandro Celaya
2023-07-24 20:14:59 +02:00
parent 768fb1992f
commit 3a0cea1268
230 changed files with 485 additions and 524 deletions

View File

@@ -60,24 +60,6 @@ export const selectServer = (buildShlinkApiClient: ShlinkApiClientBuilder) => cr
type SelectServerThunk = ReturnType<typeof selectServer>;
export const selectServerListener = (
selectServerThunk: SelectServerThunk,
loadMercureInfo: () => PayloadAction<any>, // TODO Consider setting actual type, if relevant
) => {
const listener = createListenerMiddleware();
// 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;
};
export const selectedServerReducerCreator = (selectServerThunk: SelectServerThunk) => createSlice({
name: REDUCER_PREFIX,
initialState,