summaryrefslogtreecommitdiff
path: root/app/client/common/header.component.js
blob: 1e278567b2d01af13d024d5006e11ded3d1620c6 (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
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="/dashboard">dashboard</Link></span>
      <span>checkpoints</span>
      <span>datasets</span>
      <span>results</span>
      <span>live</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)