2018-12-29 15:02:18 +01:00
|
|
|
import React from 'react'
|
2019-01-01 12:23:17 +01:00
|
|
|
import { Link, withRouter } from 'react-router-dom'
|
2018-12-29 15:02:18 +01:00
|
|
|
import { Dropdown } from "../components"
|
|
|
|
|
import Icons from "../images/icons.svg"
|
|
|
|
|
import './Header.css'
|
|
|
|
|
import list from './HeaderMenuList.json'
|
|
|
|
|
|
2019-01-01 12:23:17 +01:00
|
|
|
function Header({ home, lastStudy, location }) {
|
|
|
|
|
const { state } = location
|
|
|
|
|
|
2018-12-29 15:02:18 +01:00
|
|
|
return (
|
2019-01-01 12:23:17 +01:00
|
|
|
<div className={`entry-header ${home ? 'header-big' : ''}`}>
|
|
|
|
|
<div className='header-left-box'>
|
|
|
|
|
{
|
|
|
|
|
state && state.studyLink &&
|
|
|
|
|
<Link to={state.studyLink} className="header-btn header-viewerLink">
|
|
|
|
|
Back to Viewer
|
|
|
|
|
</Link>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<a target="_blank" rel="noopener noreferrer" className="header-brand" href="http://ohif.org">
|
|
|
|
|
<svg className="header-logo-image">
|
|
|
|
|
<use xlinkHref={`${Icons}#icon-ohif-logo`} />
|
|
|
|
|
</svg>
|
|
|
|
|
<div className="header-logo-text">Open Health Imaging Foundation</div>
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
{!home &&
|
|
|
|
|
<Link className='header-btn header-studyListLinkSection' to={{
|
|
|
|
|
pathname: "/",
|
|
|
|
|
state: { studyLink: location.pathname }
|
|
|
|
|
}}>Study list</Link>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
2018-12-29 15:02:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="header-menu">
|
2019-01-07 14:00:54 +01:00
|
|
|
<span className="research-use">
|
|
|
|
|
INVESTIGATIONAL USE ONLY
|
|
|
|
|
</span>
|
2018-12-29 15:02:18 +01:00
|
|
|
<Dropdown
|
|
|
|
|
title='Options'
|
|
|
|
|
list={list}
|
|
|
|
|
align='right'
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-01 12:23:17 +01:00
|
|
|
export default withRouter(Header)
|