MM-9921 Load select team screen when user has no teams (#1527)

* MM-9921 Load select team screen when user has no teams

* Revert to PureComponent
This commit is contained in:
Elias Nahum 2018-03-22 16:08:03 +02:00 committed by Harrison Healey
parent 1114c3f8dd
commit fb9760b5a6

View file

@ -22,7 +22,7 @@ export default class Root extends PureComponent {
theme: PropTypes.object.isRequired,
};
componentDidMount() {
componentWillMount() {
if (!this.props.excludeEvents) {
EventEmitter.on(ViewTypes.NOTIFICATION_IN_APP, this.handleInAppNotification);
EventEmitter.on(ViewTypes.NOTIFICATION_TAPPED, this.handleNotificationTapped);
@ -56,6 +56,11 @@ export default class Root extends PureComponent {
};
handleNoTeams = () => {
if (!this.refs.provider) {
setTimeout(this.handleNoTeams, 200);
return;
}
const {currentUrl, navigator, theme} = this.props;
const {intl} = this.refs.provider.getChildContext();