Skip to content

Commit 62669eb

Browse files
committed
refactor(upcoming-trip-renderer): add proper conversion to ms
1 parent 8db59fa commit 62669eb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: i18n/fr-FR.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ components:
291291
description: Reprenez le suivi pour obtenir des dernières conditions de votre trajet.
292292
heading: Suivi suspendu jusqu'à demain
293293
upcoming:
294-
nextTripBegins: "Prochain départ : {tripDate, date, ::eeeee yyyyMMdd} à {tripTime, time, short}."
294+
nextTripBegins: "Prochain départ : {tripDatetime, date, ::eeeee yyyyMMdd} à {tripDatetime, time, short}."
295295
tripBegins: Départ prévu à {tripStart, time, short}. (Le suivi en temps réel débutera à {monitoringStart, time, short}.)
296296
tripStartIsDelayed: Départ retardé de ${duration}.
297297
tripStartIsEarly: Départ avancé de ${duration} !

Diff for: lib/components/user/monitored-trip/trip-status-rendering-strategies/upcoming-trip-renderer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ export default function upcomingTripRenderer ({
1919
timeFormat
2020
}) {
2121
const data = baseRenderer(monitoredTrip)
22+
const ONE_MINUTE = 60 * 1000
2223

2324
const minutesUntilTripStart = getMinutesUntilItineraryStart(
2425
data.matchingItinerary
2526
)
2627

2728
// set default panel bootstrap style
2829
data.panelBsStyle = 'info'
29-
3030
const tripStart = data.matchingItinerary.startTime
31-
const monitoringStart = tripStart - monitoredTrip.leadTimeInMinutes * 60
31+
const monitoringStart = tripStart - monitoredTrip.leadTimeInMinutes * ONE_MINUTE
3232
data.bodyText = (
3333
<FormattedMessage
3434
id='components.TripStatusRenderers.upcoming.tripBegins'

0 commit comments

Comments
 (0)