import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import HeaderSettings from './HeaderSettings'; import SettingsPopup from './SettingsPopup'; import cx from 'classnames'; import MainTabsLinks from './MainTabsLinks'; import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'; import HeaderLogo from './HeaderLogo'; import HeaderDots from './HeaderDots'; export class AppHeader extends React.Component { static propTypes = { appCommonState: PropTypes.object.isRequired, actions: PropTypes.object.isRequired, userFirstName: PropTypes.string, userLastName: PropTypes.string, userRole: PropTypes.string.isRequired, restrictions: PropTypes.object.isRequired, themeOptions: PropTypes.object.isRequired }; state = { active: false, mobile: false, activeSecondaryMenuMobile: false }; toggleResponsiveMenu = () => { this.props.actions.toggleSidebar(); }; activeSearchFunc = () => { this.setState({ active: !this.state.active }); }; render() { const { appCommonState, restrictions, actions, userFirstName, userLastName, themeOptions } = this.props; const mainTabs = Object.keys(appCommonState.tabs); const { headerBackgroundColor, enableHeaderShadow, enableMobileMenuSmall } = themeOptions; const settingsPopupVisible = appCommonState.isSettingsPopupVisible; return (
{settingsPopupVisible && ( )}
); } } export default AppHeader;