File tree Expand file tree Collapse file tree 4 files changed +5
-33
lines changed
components/narrative/default Expand file tree Collapse file tree 4 files changed +5
-33
lines changed Original file line number Diff line number Diff line change 1
- import React , { Component } from 'react '
1
+ import { humanizeDistanceString } from '@opentripplanner/humanize-distance '
2
2
import PropTypes from 'prop-types'
3
+ import React , { Component } from 'react'
3
4
4
5
import Icon from '../icon'
5
-
6
6
import LegDiagramPreview from '../leg-diagram-preview'
7
- import { distanceString } from '../../../util/distance'
8
7
import { getStepInstructions } from '../../../util/itinerary'
9
8
import { formatDuration } from '../../../util/time'
10
9
@@ -50,7 +49,7 @@ export default class AccessLeg extends Component {
50
49
{ ' ' }
51
50
< span className = 'leg-duration' > { formatDuration ( leg . duration ) } </ span >
52
51
{ ' ' }
53
- < span className = 'leg-distance' > ({ distanceString ( leg . distance ) } )</ span >
52
+ < span className = 'leg-distance' > ({ humanizeDistanceString ( leg . distance ) } )</ span >
54
53
</ button >
55
54
{ active &&
56
55
< div className = 'step-by-step' >
@@ -62,7 +61,7 @@ export default class AccessLeg extends Component {
62
61
key = { stepIndex }
63
62
className = { `step ${ stepIsActive ? 'active' : '' } ` }
64
63
onClick = { ( e ) => this . _onStepClick ( e , step , stepIndex ) } >
65
- < span className = 'step-distance' > { distanceString ( step . distance ) } </ span >
64
+ < span className = 'step-distance' > { humanizeDistanceString ( step . distance ) } </ span >
66
65
< span className = 'step-text' > { getStepInstructions ( step ) } </ span >
67
66
</ button >
68
67
)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- import * as distance from './distance'
2
1
import * as itinerary from './itinerary'
3
2
import * as map from './map'
4
3
import * as profile from './profile'
@@ -9,7 +8,6 @@ import * as time from './time'
9
8
import * as ui from './ui'
10
9
11
10
const OtpUtils = {
12
- distance,
13
11
itinerary,
14
12
map,
15
13
profile,
Original file line number Diff line number Diff line change 34
34
"@opentripplanner/endpoints-overlay" : " ^0.0.19" ,
35
35
"@opentripplanner/from-to-location-picker" : " ^0.0.19" ,
36
36
"@opentripplanner/geocoder" : " ^0.0.19" ,
37
+ "@opentripplanner/humanize-distance" : " ^0.0.19" ,
37
38
"@opentripplanner/icons" : " ^0.0.19" ,
38
39
"@opentripplanner/itinerary-body" : " ^0.0.19" ,
39
40
"@opentripplanner/location-field" : " ^0.0.19" ,
You can’t perform that action at this time.
0 commit comments