Skip to content

Commit

Permalink
deprecated lifecycles removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ahjyrkia committed Jan 31, 2024
1 parent 82af63b commit 2fd120d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
6 changes: 2 additions & 4 deletions src/components/a3Timetable/a3Timetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 1 addition & 4 deletions src/components/a3stopPoster/a3stopPoster.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/components/qrCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 2fd120d

Please sign in to comment.