summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/editor/annotation/annotations.container.js
blob: 3a247d098883cde88f27cfc8bb586bd608751e79 (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
import React, { Component } from 'react'
import { connect } from 'react-redux'

import AnnotationForm from './components/annotation.form'
import AnnotationIndex from './components/annotation.index'

import './annotation.form.css'
import './annotation.index.css'

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

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

export default connect(mapStateToProps)(Annotations)