@@ -42,13 +42,12 @@ export const EditRoutePathLeftPanel: FC<{ state: EditRoutePathState }> = ({ stat
42
42
const infraID = useSelector ( getInfraID ) ;
43
43
const [ isSaving , setIsSaving ] = useState ( false ) ;
44
44
const [ includeReleaseDetectors , setIncludeReleaseDetectors ] = useState ( true ) ;
45
- const { entryPoint, exitPoint, entryPointDirection } = state . routeState ;
45
+ const { entryPoint, exitPoint } = state . routeState ;
46
46
47
47
const [ postPathfinding ] = osrdEditoastApi . endpoints . postInfraByIdPathfinding . useMutation ( ) ;
48
48
49
49
const searchCandidates = useCallback ( async ( ) => {
50
- if ( ! entryPoint || ! exitPoint || ! entryPointDirection || state . optionsState . type === 'loading' )
51
- return ;
50
+ if ( ! entryPoint || ! exitPoint || state . optionsState . type === 'loading' ) return ;
52
51
53
52
setState ( {
54
53
optionsState : { type : 'loading' } ,
@@ -57,7 +56,6 @@ export const EditRoutePathLeftPanel: FC<{ state: EditRoutePathState }> = ({ stat
57
56
const payload = await getCompatibleRoutesPayload (
58
57
infraID as number ,
59
58
entryPoint ,
60
- entryPointDirection ,
61
59
exitPoint ,
62
60
dispatch
63
61
) ;
@@ -87,7 +85,7 @@ export const EditRoutePathLeftPanel: FC<{ state: EditRoutePathState }> = ({ stat
87
85
} ) ) ,
88
86
} ,
89
87
} ) ;
90
- } , [ entryPoint , entryPointDirection , exitPoint , infraID , setState , state . optionsState . type ] ) ;
88
+ } , [ entryPoint , exitPoint , infraID , setState , state . optionsState . type ] ) ;
91
89
92
90
const focusedOptionIndex =
93
91
state . optionsState . type === 'options' ? state . optionsState . focusedOptionIndex : null ;
@@ -108,12 +106,7 @@ export const EditRoutePathLeftPanel: FC<{ state: EditRoutePathState }> = ({ stat
108
106
< button
109
107
className = "btn btn-primary btn-sm mr-2 d-block w-100 text-center"
110
108
type = "submit"
111
- disabled = {
112
- ! entryPoint ||
113
- ! entryPointDirection ||
114
- ! exitPoint ||
115
- state . optionsState . type === 'loading'
116
- }
109
+ disabled = { ! entryPoint || ! exitPoint || state . optionsState . type === 'loading' }
117
110
>
118
111
< FiSearch /> { t ( 'Editor.tools.routes-edition.search-routes' ) }
119
112
</ button >
@@ -222,7 +215,6 @@ export const EditRoutePathLeftPanel: FC<{ state: EditRoutePathState }> = ({ stat
222
215
id : '' , // will be replaced by entityToCreateOperation
223
216
entry_point : omit ( entryPoint , 'position' ) ,
224
217
exit_point : omit ( exitPoint , 'position' ) ,
225
- entry_point_direction : entryPointDirection ,
226
218
switches_directions : candidate . data . switches_directions ,
227
219
release_detectors : includeReleaseDetectors
228
220
? candidate . data . detectors
0 commit comments