import * as React from 'react' import InlineSVG from 'svg-inline-react' import { debounce } from 'lodash' import './styles.styl' import { SettingsComponentProps } from './interfaces' import Toggle from '../../Settings/Toggle' const close = require('!svg-inline-loader?removeTags=true&removeSVGTagAttrs=false!../../../../img/svg/settings-close.svg') const driftLogo = require('!svg-inline-loader?removeTags=true&removeSVGTagAttrs=false!../../../../img/svg/Drift_logo.svg') const saved = require('!svg-inline-loader?removeTags=true&removeSVGTagAttrs=false!../../../../img/svg/save-check.svg') declare const __VERSION__: string const flashSaveIcon = (querySelector: string) => { const savedIcon = document.querySelector(querySelector) as HTMLElement savedIcon.style.opacity = '1' setTimeout(() => { savedIcon.style.opacity = '0' }, 2000) } class SettingsNotifications extends React.Component { componentWillMount() { this.props.actions.fetchUserProperties() } debouncedSaveNotifications = debounce(() => { flashSaveIcon('.notifications-settings-saved') }, 500) render() { const { notificationVisitedSite, notificationClickedEmailLink, notificationOpenedEmail, handleOnSettingsClick, handleCloseSettings, actions: { updateSetting, logout }, } = this.props return (
< All Settings

Browser Notifications

Get notified when a prospect opens or clicks your email, visits pages on your site, and when they send you a message.

Visited your site
Clicked a tracked link in email
Opened your email
logout()}> logout
version {__VERSION__}
) } } export default SettingsNotifications