Skip to content
Snippets Groups Projects

fix: recover setting save state id to url params

Merged Leonardo Christino requested to merge oldmaina into main
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import type { RootState } from './store';
import { DatabaseStatus, SaveStateAuthorizationHeaders, SaveStateI } from '../broker/wsState';
import { getParam, URLParams } from '../api/url';
import { getParam, setParam, URLParams } from '../api/url';
import { cloneDeep } from 'lodash-es';
/** Message format of the error message from the backend */
@@ -49,6 +49,7 @@ export const sessionSlice = createSlice({
} else {
state.currentSaveState = undefined;
}
setParam(URLParams.saveState, action.payload);
},
updateSelectedSaveState: (state: SessionCacheI, action: PayloadAction<SaveStateI>) => {
if (state.currentSaveState === action.payload.id && state.currentSaveState) state.saveStates[state.currentSaveState] = action.payload;
Loading