Skip to content

Commit

Permalink
address pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Oct 13, 2023
1 parent 44186d1 commit 17e338c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ itinerary:
# a gray background
disableMetroSeperatorDot: false
# Show the number of minutes of delay or early beneath a time in the itinerary body
showLateness: true
showScheduleDeviation: true
# Shows the duration of a leg below the leg in the metro itinerary summary
showLegDurations: false
# The sort option to use by default
Expand Down
12 changes: 7 additions & 5 deletions lib/components/viewers/realtime-status-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const RealtimeStatusLabel = ({
isRealtime,
onTimeThresholdSeconds,
originalTime,
showLateness,
showScheduleDeviation,
time,
withBackground
}: {
Expand All @@ -75,7 +75,7 @@ const RealtimeStatusLabel = ({
isRealtime?: boolean
onTimeThresholdSeconds?: number
originalTime?: number
showLateness?: boolean
showScheduleDeviation?: boolean
time?: number
withBackground?: boolean
}): JSX.Element => {
Expand Down Expand Up @@ -119,7 +119,7 @@ const RealtimeStatusLabel = ({
withBackground={withBackground}
>
{renderedTime}
{showLateness && (
{showScheduleDeviation && (
<MainContent>
<FormattedRealtimeStatusLabel
minutes={
Expand Down Expand Up @@ -157,10 +157,12 @@ const RealtimeStatusLabel = ({

const mapStateToProps = (state: {
// Typescript TODO: type state
otp: { config: { onTimeThresholdSeconds: any; showLateness: boolean } }
otp: {
config: { onTimeThresholdSeconds: any; showScheduleDeviation: boolean }
}
}) => ({
onTimeThresholdSeconds: state.otp.config.onTimeThresholdSeconds,
showLateness: state.otp.config.showLateness
showScheduleDeviation: state.otp.config.showScheduleDeviation
})

export default connect(mapStateToProps)(RealtimeStatusLabel)

0 comments on commit 17e338c

Please sign in to comment.