@@ -26,20 +26,21 @@ export default function SubmitConfUpdateTrainSchedules({
2626 setIsWorking,
2727 setDisplayTrainScheduleManagement,
2828} : SubmitConfUpdateTrainSchedulesProps ) {
29- const { getTrainScheduleIDsToModify } = useOsrdConfSelectors ( ) ;
29+ const { getTrainScheduleIDsToModify, getConf, getPathfindingID, getName, getDepartureTime } =
30+ useOsrdConfSelectors ( ) ;
31+ const confName = useSelector ( getName ) ;
32+ const simulationConf = useSelector ( getConf ) ;
33+ const pathfindingID = useSelector ( getPathfindingID ) ;
34+ const departureTime = useSelector ( getDepartureTime ) ;
35+ const trainScheduleIDsToModify = useSelector ( getTrainScheduleIDsToModify ) ;
36+
3037 const { updateTrainScheduleIDsToModify } = useOsrdConfActions ( ) ;
3138 const dispatch = useDispatch ( ) ;
3239 const { t } = useTranslation ( [ 'operationalStudies/manageTrainSchedule' ] ) ;
33- const trainScheduleIDsToModify = useSelector ( getTrainScheduleIDsToModify ) ;
40+
3441 const [ patchTrainSchedules ] = osrdEditoastApi . endpoints . patchTrainSchedule . useMutation ( ) ;
3542
3643 async function submitConfUpdateTrainSchedules ( ) {
37- const { getConf, getPathfindingID, getName, getDepartureTime } = useOsrdConfSelectors ( ) ;
38- const simulationConf = useSelector ( getConf ) ;
39- const pathfindingID = useSelector ( getPathfindingID ) ;
40- const confName = useSelector ( getName ) ;
41- const departureTime = useSelector ( getDepartureTime ) ;
42-
4344 // First train tested, and next we put the other trains
4445 const formattedSimulationConf = formatConf ( dispatch , t , simulationConf , true ) ;
4546 if ( ! pathfindingID ) {
0 commit comments