import * as cx from 'classnames' import * as React from 'react' import { CSSTransitionGroup } from 'react-transition-group' import InlineSVG from 'svg-inline-react' import { encodeQueryData } from '../../utils/helpers' import { HeaderComponentProps } from './interfaces' import SearchComponent from './SearchComponent' import './styles.styl' import { PopupView } from '../../interfaces/PopupView' const powerByDriftLinkParams = { utm_source: 'extension', utm_medium: 'chrome-extension', utm_campaign: 'extension-referral', } const gearIcon = require('!svg-inline-loader?removeTags=true&removeSVGTagAttrs=false!../../../img/svg/settings.svg') const conversationIcon = require('!svg-inline-loader?removeTags=true&removeSVGTagAttrs=false!../../../img/svg/conversation-notif.svg') const driftHeaderLogo = require('!svg-inline-loader?removeTags=true&removeSVGTagAttrs=false!../../../img/svg/Drift_logo.svg') class Header extends React.Component { handleConversationIconClick = () => { this.props.actions.searchFocused(false) this.props.actions.updateSearchQuery('') const elem = document.querySelector('.popup-feed-container .top') if (elem) { elem.scrollIntoView({ behavior: 'smooth' }) } } render() { const { view, searchFocused, conversations, conversationIconStatus, handleOnSettingsClick, } = this.props return (
{ conversationIconStatus &&
{Object.keys(conversations).length}
}
) } } export default Header