diff --git a/src/components/channels_list_view.js b/src/components/channels_list_view.js index f05c9dd88..e9c02fbb7 100644 --- a/src/components/channels_list_view.js +++ b/src/components/channels_list_view.js @@ -24,8 +24,8 @@ class ChannelsListView extends Component { this.props.actions.fetchChannels(); } - componentWillReceiveProps(props) { - const {currentChannelId} = props.channels; + componentWillReceiveProps(nextProps) { + const {currentChannelId} = nextProps.channels; if (currentChannelId && currentChannelId !== this.props.channels.currentChannelId) { Routes.goToPostsList(); diff --git a/src/components/login_view.js b/src/components/login_view.js index 53358776a..d004381a7 100644 --- a/src/components/login_view.js +++ b/src/components/login_view.js @@ -28,9 +28,9 @@ class LoginView extends Component { password: '' }; - componentWillReceiveProps(props) { + componentWillReceiveProps(nextProps) { if (this.props.login.status === 'fetching' && - props.login.status === 'fetched') { + nextProps.login.status === 'fetched') { Routes.goToSelectTeam(); } } diff --git a/src/components/logout.js b/src/components/logout.js index 65be3d53f..49a78e22e 100644 --- a/src/components/logout.js +++ b/src/components/logout.js @@ -16,9 +16,9 @@ const propTypes = { class Logout extends Component { static propTypes = propTypes; - componentWillReceiveProps(newProps) { + componentWillReceiveProps(nextProps) { if (this.props.logout.status === 'fetching' && - newProps.logout.status === 'fetched') { + nextProps.logout.status === 'fetched') { Routes.popTo('goToSelectServer'); } } diff --git a/src/components/select_team_view.js b/src/components/select_team_view.js index db06ebd33..74978468b 100644 --- a/src/components/select_team_view.js +++ b/src/components/select_team_view.js @@ -27,8 +27,8 @@ export default class SelectTeamView extends Component { this.props.actions.fetchTeams(); } - componentWillReceiveProps(props) { - const {currentTeamId} = props.teams; + componentWillReceiveProps(nextProps) { + const {currentTeamId} = nextProps.teams; if (currentTeamId && currentTeamId !== this.props.teams.currentTeamId) { Routes.goToChannelsList();