summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align/containers/annotations.container.js
blob: e32757b1f0f3c95378765f542061a68602b17cd7 (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
37
38
39
40
41
42
43
44
import React, { Component } from 'react'
// import { Link } from 'react-router-dom'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'

import actions from '../../../actions'
// import * as alignActions from '../align.actions'

import { ZOOM_STEPS } from '../constants'
import { clamp } from '../../../util'
import { positionToTime } from '../align.util'

import AnnotationForm from '../components/annotations/annotation.form'

class Annotations extends Component {
  constructor(props){
    super(props)
    // this.handleKeydown = this.handleKeydown.bind(this)
  }
  render() {
    return (
      <div className='annotations'>
        {this.props.annotation.start_ts &&
          <AnnotationForm />
        }
      </div>
    )
  }
}

/*
- get the first sentence from the text
- display the form at that point
*/

const mapStateToProps = state => ({
  timeline: state.align.timeline,
  annotation: state.align.annotation,
})

const mapDispatchToProps = dispatch => ({
})

export default connect(mapStateToProps, mapDispatchToProps)(Annotations)