Skip to content

Commit c66a921

Browse files
committed
feat(multi-agency): add support for multi-agency routes
Link to agency website with agency name and agency branding URL. re ibi-group/trimet-mod-otp#169
1 parent cf6a4f6 commit c66a921

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

lib/components/narrative/line-itin/transit-leg-body.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,16 @@ export default class TransitLegBody extends Component {
3939

4040
render () {
4141
const { customIcons, leg } = this.props
42-
const { alerts, mode, routeShortName, routeLongName, headsign } = leg
42+
const {
43+
agencyBrandingUrl,
44+
agencyName,
45+
agencyUrl,
46+
alerts,
47+
mode,
48+
routeShortName,
49+
routeLongName,
50+
headsign
51+
} = leg
4352
const { alertsExpanded, stopsExpanded } = this.state
4453

4554
let iconMode = mode
@@ -111,6 +120,18 @@ export default class TransitLegBody extends Component {
111120
{stopsExpanded ? <IntermediateStops stops={leg.intermediateStops} /> : null }
112121
</VelocityTransitionGroup>
113122

123+
<span className='agency-info'>
124+
Service operated by{' '}
125+
<a href={agencyUrl} target='_blank'>
126+
{agencyName}{agencyBrandingUrl &&
127+
<img
128+
src={agencyBrandingUrl}
129+
height={25}
130+
style={{ marginLeft: '5px' }} />
131+
}
132+
</a>
133+
</span>
134+
114135
{/* Average wait details, if present */}
115136
{leg.averageWait && <span>Typical Wait: {formatDuration(leg.averageWait)}</span>}
116137
</div>

0 commit comments

Comments
 (0)