@@ -8,8 +8,6 @@ import { useSelector } from 'react-redux';
8
8
import InputSNCF from 'common/BootstrapSNCF/InputSNCF' ;
9
9
import { ModalBodySNCF , ModalHeaderSNCF } from 'common/BootstrapSNCF/ModalSNCF' ;
10
10
import SwitchSNCF , { SWITCH_TYPES } from 'common/BootstrapSNCF/SwitchSNCF/SwitchSNCF' ;
11
- import { operationalStudiesConfSliceActions } from 'reducers/osrdconf/operationalStudiesConf' ;
12
- import { stdcmConfSliceActions } from 'reducers/osrdconf/stdcmConf' ;
13
11
import { updateUserPreferences , switchStdcmV2Activated } from 'reducers/user' ;
14
12
import { getUserPreferences , getStdcmV2Activated } from 'reducers/user/userSelectors' ;
15
13
import { useAppDispatch } from 'store' ;
@@ -23,27 +21,6 @@ const UserSettings = () => {
23
21
24
22
const debouncedSafeWord = useDebounce ( safeWordText , 500 ) ;
25
23
26
- const {
27
- updateScenarioID : updateEexScenarioId ,
28
- updateTimetableID : updateEexTimetableId ,
29
- updateInfraID : updateEexInfraId ,
30
- } = operationalStudiesConfSliceActions ;
31
- const {
32
- updateScenarioID : updateStdcmScenarioId ,
33
- updateTimetableID : updateStdcmTimetableId ,
34
- updateInfraID : updateStdcmInfraId ,
35
- } = stdcmConfSliceActions ;
36
-
37
- const resetStore = ( ) => {
38
- dispatch ( updateEexScenarioId ( undefined ) ) ;
39
- dispatch ( updateEexTimetableId ( undefined ) ) ;
40
- dispatch ( updateEexInfraId ( undefined ) ) ;
41
-
42
- dispatch ( updateStdcmScenarioId ( undefined ) ) ;
43
- dispatch ( updateStdcmTimetableId ( undefined ) ) ;
44
- dispatch ( updateStdcmInfraId ( undefined ) ) ;
45
- } ;
46
-
47
24
useEffect ( ( ) => {
48
25
dispatch ( updateUserPreferences ( { ...userPreferences , safeWord : debouncedSafeWord } ) ) ;
49
26
} , [ debouncedSafeWord ] ) ;
@@ -89,7 +66,6 @@ const UserSettings = () => {
89
66
name = "stdcm-version-switch"
90
67
onChange = { ( ) => {
91
68
dispatch ( switchStdcmV2Activated ( ) ) ;
92
- resetStore ( ) ;
93
69
} }
94
70
checked = { stdcmV2Activated }
95
71
/>
0 commit comments