blob: 29c371375c2de0cecc5620990f06df351db46aab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
import { h, Component } from 'preact'
import { Link } from 'react-router-dom';
import { connect } from 'react-redux'
function Header(props) {
const tools = "pix2pix samplernn style_transfer_video style_transfer_audio".split(" ").map((s,i) => {
return <option value={s}>{s}</option>
})
return (
<header>
<b>live cortex</b>
<span>
<select>
{tools}
</select>
</span>
<span><Link to="/system">system</Link></span>
<span><Link to="/dashboard">dashboard</Link></span>
<span>checkpoints</span>
<span>datasets</span>
<span>results</span>
<span><Link to="/live">live</Link></span>
<span>{props.fps} fps</span>
</header>
)
}
const mapStateToProps = state => ({
fps: state.live.fps,
frame: state.live.frame,
})
const mapDispatchToProps = (dispatch, ownProps) => ({
})
export default connect(mapStateToProps, mapDispatchToProps)(Header)
|