@@ -64,14 +64,13 @@ const propTypes = {
6464const defaultProps = {
6565 route : {
6666 params : {
67- iouType : '' ,
6867 waypointIndex : '' ,
6968 } ,
7069 } ,
7170 transaction : { } ,
7271} ;
7372
74- function WaypointEditor ( { transactionID, route : { params : { iouType = '' , waypointIndex = '' } = { } } = { } , network, translate, transaction} ) {
73+ function WaypointEditor ( { transactionID, route : { params : { waypointIndex = '' } = { } } = { } , network, translate, transaction} ) {
7574 const textInput = useRef ( null ) ;
7675 const currentWaypoint = lodashGet ( transaction , `comment.waypoints.waypoint${ waypointIndex } ` , { } ) ;
7776 const waypointAddress = lodashGet ( currentWaypoint , 'address' , '' ) ;
@@ -111,7 +110,7 @@ function WaypointEditor({transactionID, route: {params: {iouType = '', waypointI
111110 }
112111
113112 // Other flows will be handled by selecting a waypoint with selectWaypoint as this is mainly for the offline flow
114- Navigation . navigate ( ROUTES . getMoneyRequestDistanceTabRoute ( iouType ) ) ;
113+ Navigation . goBack ( ) ;
115114 } ;
116115
117116 const selectWaypoint = ( values ) => {
@@ -122,7 +121,7 @@ function WaypointEditor({transactionID, route: {params: {iouType = '', waypointI
122121 } ;
123122
124123 Transaction . saveWaypoint ( transactionID , waypointIndex , waypoint ) ;
125- Navigation . navigate ( ROUTES . getMoneyRequestDistanceTabRoute ( iouType ) ) ;
124+ Navigation . goBack ( ) ;
126125 } ;
127126
128127 return (
@@ -134,7 +133,7 @@ function WaypointEditor({transactionID, route: {params: {iouType = '', waypointI
134133 title = "Waypoint Editor"
135134 shouldShowBackButton
136135 onBackButtonPress = { ( ) => {
137- Navigation . navigate ( ROUTES . getMoneyRequestDistanceTabRoute ( iouType ) ) ;
136+ Navigation . goBack ( ) ;
138137 } }
139138 />
140139 < Form
0 commit comments