fix telemetry notification display (#3166)

This commit is contained in:
Rishichandra Wawhal 2019-10-17 18:18:28 +05:30 committed by Rikin Kachhia
parent 1369876699
commit d82c6d464f

View File

@ -17,6 +17,17 @@ class App extends Component {
document.getElementById('loading').style.display = 'none';
}
componentDidUpdate() {
const { telemetry, dispatch } = this.props;
if (
telemetry.console_opts &&
!telemetry.console_opts.telemetryNotificationShown
) {
dispatch(telemetryNotificationShown());
dispatch(showTelemetryNotification());
}
}
render() {
const styles = require('./App.scss');
const {
@ -28,7 +39,6 @@ class App extends Component {
children,
notifications,
connectionFailed,
telemetry,
dispatch,
metadata,
} = this.props;
@ -53,14 +63,6 @@ class App extends Component {
);
}
if (
telemetry.console_opts &&
!telemetry.console_opts.telemetryNotificationShown
) {
dispatch(showTelemetryNotification());
dispatch(telemetryNotificationShown());
}
return (
<ErrorBoundary metadata={metadata} dispatch={dispatch}>
<div>