import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Link, withRouter } from 'react-router-dom'; import { Dropdown } from 'react-viewerbase'; import { withTranslation } from 'react-i18next'; import './Header.css'; import OHIFLogo from '../OHIFLogo/OHIFLogo.js'; import ConnectedUserPreferencesModal from '../../connectedComponents/ConnectedUserPreferencesModal.js'; class Header extends Component { static propTypes = { home: PropTypes.bool.isRequired, location: PropTypes.object.isRequired, openUserPreferencesModal: PropTypes.func, children: PropTypes.node, }; static defaultProps = { home: true, children: OHIFLogo(), }; constructor(props) { super(props); this.state = { userPreferencesOpen: false, }; this.options = [ { title: 'Preferences ', icon: 'fa fa-user', onClick: this.props.openUserPreferencesModal, }, { title: 'About', icon: 'fa fa-info', link: 'http://ohif.org', }, ]; } render() { return (
{this.props.location && this.props.location.studyLink && ( Back to Viewer )} {this.props.children} {!this.props.home && ( Study list )}
INVESTIGATIONAL USE ONLY {this.props.t('header_test')}
); } } export default withTranslation('Header')(withRouter(Header));