Skip to content

Commit

Permalink
Merge pull request #4360 from parasharrajat/fixTime
Browse files Browse the repository at this point in the history
Fix timerow should update on Language changes.
  • Loading branch information
nkuoch authored Aug 2, 2021
2 parents 87cbc24 + 6ffb1f8 commit d6aba3d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/pages/home/report/ParticipantLocalTime.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, {PureComponent} from 'react';
import {
View,
} from 'react-native';
Expand All @@ -18,7 +18,7 @@ const propTypes = {
...withLocalizePropTypes,
};

class ParticipantLocalTime extends React.Component {
class ParticipantLocalTime extends PureComponent {
constructor(props) {
super(props);
this.getParticipantLocalTime = this.getParticipantLocalTime.bind(this);
Expand All @@ -35,13 +35,8 @@ class ParticipantLocalTime extends React.Component {
}, 1000));
}

shouldComponentUpdate(nextProps, nextState) {
return nextState.localTime !== this.state.localTime;
}

componentWillUnmount() {
clearInterval(this.timer);
clearInterval(this.readyTimer);
}

getParticipantLocalTime() {
Expand Down

0 comments on commit d6aba3d

Please sign in to comment.