diff --git a/src/components/a3Timetable/a3Timetable.js b/src/components/a3Timetable/a3Timetable.js index c8a41375..2072cf6f 100644 --- a/src/components/a3Timetable/a3Timetable.js +++ b/src/components/a3Timetable/a3Timetable.js @@ -33,11 +33,8 @@ class Timetable extends Component { }; } - componentWillMount() { - renderQueue.add(this); - } - componentDidMount() { + renderQueue.add(this); let departures = []; const weekdays = this.rowsByHour(this.props.weekdays); const saturdays = this.rowsByHour(this.props.saturdays); @@ -228,6 +225,7 @@ class Timetable extends Component { groupedRows.pop(); weekdays.groupedRows = groupedRows; } + // eslint-disable-next-line no-constant-condition while (true) { const lastGroupedRows = last(groupedRows); const lastRow = last(lastGroupedRows); diff --git a/src/components/a3stopPoster/a3stopPoster.js b/src/components/a3stopPoster/a3stopPoster.js index c1acbefd..2a15d635 100644 --- a/src/components/a3stopPoster/a3stopPoster.js +++ b/src/components/a3stopPoster/a3stopPoster.js @@ -31,11 +31,8 @@ class A3StopPoster extends Component { }; } - componentWillMount() { - renderQueue.add(this); - } - componentDidMount() { + renderQueue.add(this); this.updateLayout(); renderQueue.onEmpty(error => !error && this.updateLayout(), { ignore: this, diff --git a/src/components/qrCode.js b/src/components/qrCode.js index 0f4de63c..d6ab87e0 100644 --- a/src/components/qrCode.js +++ b/src/components/qrCode.js @@ -13,9 +13,9 @@ class QrCode extends Component { this.updateCode(this.props.url); } - componentWillReceiveProps(nextProps) { - if (nextProps.url !== this.props.url) { - this.updateCode(nextProps.url); + componentDidUpdate(prevProps) { + if (this.props.url !== prevProps.url) { + this.updateCode(this.props.url); } }