|
a |
|
b/app/frontend/src/components/Header.js |
|
|
1 |
import React, { Component } from 'react' |
|
|
2 |
import { Link } from "react-router-dom"; |
|
|
3 |
|
|
|
4 |
import {connect} from 'react-redux'; |
|
|
5 |
|
|
|
6 |
class Header extends Component { |
|
|
7 |
state = { |
|
|
8 |
hidden: false, |
|
|
9 |
|
|
|
10 |
} |
|
|
11 |
|
|
|
12 |
render() { |
|
|
13 |
return ( |
|
|
14 |
<nav class="flex items-center justify-between flex-wrap bg-teal-500 p-6 lg:" > |
|
|
15 |
<Link to ='/'><span class="font-semibold text-xl text-white mr-6 tracking-tight">COVID X-Ray Triage Assistant</span></Link> |
|
|
16 |
|
|
|
17 |
<div class="text-sm flex items-center justify-center" > |
|
|
18 |
|
|
|
19 |
<Link class="items-center block lg:inline-block lg:mt-0 text-teal-200 py-2 px-4 hover:text-white mr-4" to ='/'> |
|
|
20 |
Home |
|
|
21 |
</Link> |
|
|
22 |
<Link class="items-center block lg:inline-block lg:mt-0 text-teal-200 py-2 px-4 hover:text-white mr-4" to ='/past'> |
|
|
23 |
Past Results |
|
|
24 |
</Link> |
|
|
25 |
</div> |
|
|
26 |
</nav> |
|
|
27 |
) |
|
|
28 |
} |
|
|
29 |
} |
|
|
30 |
|
|
|
31 |
const mapStateToProps = state =>{ |
|
|
32 |
return { |
|
|
33 |
user:state.user |
|
|
34 |
} |
|
|
35 |
} |
|
|
36 |
|
|
|
37 |
export default connect(mapStateToProps)(Header); |