From 53dcfd5b90a0298592fba86ed4cd44587e83d40d Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Wed, 15 Jan 2025 15:24:21 +0200 Subject: [PATCH] fix: rename crazy prop name --- app/component/DepartureListContainer.js | 10 +++++----- app/component/stop/StopPageContentContainer.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/component/DepartureListContainer.js b/app/component/DepartureListContainer.js index 31b115d484..5a7c4e835a 100644 --- a/app/component/DepartureListContainer.js +++ b/app/component/DepartureListContainer.js @@ -80,7 +80,7 @@ class DepartureListContainer extends Component { infiniteScroll: PropTypes.bool, className: PropTypes.string, isTerminal: PropTypes.bool, - isStopPage: PropTypes.bool, + showVehicles: PropTypes.bool, }; static defaultProps = { @@ -88,7 +88,7 @@ class DepartureListContainer extends Component { infiniteScroll: false, className: undefined, isTerminal: false, - isStopPage: false, + showVehicles: false, mode: 'BUS', }; @@ -114,7 +114,7 @@ class DepartureListContainer extends Component { } }, 100); } - if (this.context.config.showVehiclesOnStopPage && this.props.isStopPage) { + if (this.context.config.showVehiclesOnStopPage && this.props.showVehicles) { const departures = asDepartures(this.props.stoptimes) .filter(departure => !(this.props.isTerminal && departure.isArrival)) .filter(departure => this.props.currentTime < departure.time); @@ -123,7 +123,7 @@ class DepartureListContainer extends Component { } componentDidUpdate() { - if (this.context.config.showVehiclesOnStopPage && this.props.isStopPage) { + if (this.context.config.showVehiclesOnStopPage && this.props.showVehicles) { const departures = asDepartures(this.props.stoptimes) .filter(departure => !(this.props.isTerminal && departure.isArrival)) .filter(departure => this.props.currentTime < departure.time) @@ -134,7 +134,7 @@ class DepartureListContainer extends Component { } componentWillUnmount() { - if (this.context.config.showVehiclesOnStopPage && this.props.isStopPage) { + if (this.context.config.showVehiclesOnStopPage && this.props.showVehicles) { const { client } = this.context.getStore('RealTimeInformationStore'); if (client) { this.context.executeAction(stopRealTimeClient, client); diff --git a/app/component/stop/StopPageContentContainer.js b/app/component/stop/StopPageContentContainer.js index 8d6991714c..b5dbf6247d 100644 --- a/app/component/stop/StopPageContentContainer.js +++ b/app/component/stop/StopPageContentContainer.js @@ -111,7 +111,7 @@ class StopPageContent extends React.Component { className="stop-page momentum-scroll" infiniteScroll currentTime={this.props.currentTime} - isStopPage + showVehicles />