Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
noInternet({callback: (offline) => {
if (offline && isEmpty(this.props.notification.message)) {
store.dispatch(pushNotification('You are offline 😎'));
} else if (!offline && !isEmpty(this.props.notification.message)) {
store.dispatch(removeNotification());
}
}});
CustomEvent.DISPATCH('WEB_COMP_SHOW_NOTIFICATION', {
type: 'success',
message: 'Welcome! I\'m notification-service based on Custom Element'
});
}