Skip to content

Commit

Permalink
Fix walk leg start bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hbruch committed Nov 26, 2024
1 parent 95078de commit eb5a59b
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions app/component/WalkLeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,7 @@ import DelayedTime from './DelayedTime';
import WalkSteps from './WalkSteps';

function WalkLeg(
{
children,
focusAction,
focusToLeg,
focusToStep,
index,
leg,
previousLeg,
startTime,
},
{ children, focusAction, focusToLeg, focusToStep, index, leg, previousLeg },
{ config, intl },
) {
const distance = displayDistance(
Expand Down Expand Up @@ -112,7 +103,7 @@ function WalkLeg(
<DelayedTime
leg={previousLeg}
delay={previousLeg && previousLeg.arrivalDelay}
startTime={startTime}
startTime={leg.mode === 'WALK' ? leg.startTime : leg.endTime}
/>
</div>
</div>
Expand Down Expand Up @@ -400,9 +391,6 @@ WalkLeg.propTypes = {
previousLeg: walkLegShape,
focusToLeg: PropTypes.func.isRequired,
focusToStep: PropTypes.func.isRequired,
// This is not necessarily the `leg`'s start time!
// Usually, it seems to be the previous leg's end time.
startTime: PropTypes.number.isRequired,
};

WalkLeg.defaultProps = {
Expand Down

0 comments on commit eb5a59b

Please sign in to comment.