Skip to content

Commit 78e7896

Browse files
committed
front: drop map slice
Signed-off-by: SharglutDev <p.filimon75@gmail.com>
1 parent 8d8c7a6 commit 78e7896

4 files changed

Lines changed: 1 addition & 258 deletions

File tree

front/src/reducers/index.ts

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import type { EditorSlice, EditorState } from 'reducers/editor';
1010
import editorReducer, { editorInitialState, editorSlice } from 'reducers/editor';
1111
import mainReducer, { mainInitialState, mainSlice } from 'reducers/main';
1212
import type { MainState } from 'reducers/main';
13-
import mapReducer, { mapInitialState, mapSlice } from 'reducers/map';
14-
import type { MapState } from 'reducers/map';
1513
import operationalStudiesConfReducer, {
1614
operationalStudiesConfSlice,
1715
operationalStudiesInitialConf,
@@ -41,24 +39,12 @@ const compressor = createCompressor({
4139
whitelist: ['rollingstock'],
4240
});
4341

44-
const mapWhiteList = [
45-
'mapStyle',
46-
'showOrthoPhoto',
47-
'showOSM',
48-
'layers',
49-
'layersSettings',
50-
'userPreference',
51-
'terrain3DExaggeration',
52-
];
53-
5442
const userWhiteList = ['account', 'userPreferences', 'impersonatedUser'];
5543

5644
const mainWhiteList = ['lastInterfaceVersion'];
5745

5846
const operationalStudiesConfBlackList = ['usingSpeedLimits'];
5947

60-
const saveMapFilter = createFilter(mapSlice.name, mapWhiteList);
61-
6248
const saveUserFilter = createFilter(userSlice.name, userWhiteList);
6349

6450
const saveMainFilter = createFilter(mainSlice.name, mainWhiteList);
@@ -107,19 +93,12 @@ export const persistConfig = {
10793
storage,
10894
transforms: [
10995
compressor,
110-
saveMapFilter,
11196
saveUserFilter,
11297
saveMainFilter,
11398
operationalStudiesFilter,
11499
operationalStudiesDateTransform,
115100
],
116-
whitelist: [
117-
userSlice.name,
118-
mapSlice.name,
119-
mainSlice.name,
120-
simulationResultsSlice.name,
121-
referenceMapSlice.name,
122-
],
101+
whitelist: [userSlice.name, mainSlice.name, simulationResultsSlice.name, referenceMapSlice.name],
123102
};
124103

125104
type AllActions = Action;
@@ -128,7 +107,6 @@ export type OsrdSlice = ConfSlice | EditorSlice | ReferenceMapSlice;
128107

129108
export type RootState = {
130109
[userSlice.name]: UserState;
131-
[mapSlice.name]: MapState;
132110
[referenceMapSlice.name]: ReferenceMapState;
133111
[editorSlice.name]: EditorState;
134112
[mainSlice.name]: MainState;
@@ -141,7 +119,6 @@ export type RootState = {
141119

142120
export const rootInitialState: RootState = {
143121
[userSlice.name]: userInitialState,
144-
[mapSlice.name]: mapInitialState,
145122
[referenceMapSlice.name]: referenceMapInitialState,
146123
[editorSlice.name]: editorInitialState,
147124
[mainSlice.name]: mainInitialState,
@@ -154,7 +131,6 @@ export const rootInitialState: RootState = {
154131

155132
export type AnyReducerState =
156133
| UserState
157-
| MapState
158134
| ReferenceMapState
159135
| EditorState
160136
| MainState
@@ -164,7 +140,6 @@ export type AnyReducerState =
164140

165141
export const rootReducer: ReducersMapObject<RootState> = {
166142
[userSlice.name]: userReducer,
167-
[mapSlice.name]: mapReducer,
168143
[referenceMapSlice.name]: referenceMapReducer,
169144
[editorSlice.name]: editorReducer,
170145
[mainSlice.name]: mainReducer,

front/src/reducers/map/index.ts

Lines changed: 0 additions & 56 deletions
This file was deleted.

front/src/reducers/map/mapReducer.spec.ts

Lines changed: 0 additions & 165 deletions
This file was deleted.

front/src/reducers/map/selectors.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)