Skip to content

Commit 3639fa8

Browse files
committed
refactor(narrative): fix comment typo, rename a variable to be more meaningful
1 parent 864cf79 commit 3639fa8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/components/narrative/line-itin/place-row.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ class RentedVehicleLeg extends PureComponent {
167167
)
168168
}
169169

170-
let pickUpString = 'Pick up'
170+
let rentalDescription = 'Pick up'
171171
if (leg.rentedBike) {
172172
// TODO: Special case for TriMet may need to be refactored.
173-
pickUpString += ` shared bike`
173+
rentalDescription += ` shared bike`
174174
} else {
175175
// Add company and vehicle labels.
176176
let vehicleName = ''
@@ -182,32 +182,32 @@ class RentedVehicleLeg extends PureComponent {
182182
: 'car'
183183

184184
// The networks attribute of the from data will only appear at the very
185-
// beggining of the rental. It is possible that there will be some forced
185+
// beginning of the rental. It is possible that there will be some forced
186186
// walking that occurs in the middle of the rental, so once the main mode
187187
// resumes there won't be any network info. In that case we simply return
188188
// that the rental is continuing.
189189
if (leg.from.networks) {
190190
const companies = leg.from.networks.map(n => getCompanyForNetwork(n, configCompanies))
191191
const companyLabel = companies.map(co => co.label).join('/')
192-
pickUpString += ` ${companyLabel}`
192+
rentalDescription += ` ${companyLabel}`
193193
// Only show vehicle name for car rentals. For bikes and eScooters, these
194194
// IDs/names tend to be less relevant (or entirely useless) in this context.
195195
if (leg.rentedCar && leg.from.name) {
196196
vehicleName = leg.from.name
197197
}
198198
modeString = getModeForPlace(leg.from)
199199
} else {
200-
pickUpString = 'Continue using rental'
200+
rentalDescription = 'Continue using rental'
201201
}
202202

203-
pickUpString += ` ${modeString}${vehicleName}`
203+
rentalDescription += ` ${modeString}${vehicleName}`
204204
}
205205
// e.g., Pick up REACHNOW rented car XYZNDB OR
206206
// Pick up SPIN eScooter
207207
// Pick up shared bike
208208
return (
209209
<div className='place-subheader'>
210-
{pickUpString}
210+
{rentalDescription}
211211
</div>
212212
)
213213
}

0 commit comments

Comments
 (0)