blob: a5e25dd72185d27840254e59e80b8c3c5b20bfb6 (
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
45
46
47
48
49
50
51
|
import React, { Component } from 'react'
// import { Link } from 'react-router-dom'
// import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import actions from 'app/actions'
import ParagraphList from 'app/views/paragraph/components/paragraph.list'
import { transcriptElementLookup } from './components'
const noop = () => {}
class Transcript extends Component {
constructor(props){
super(props)
this.handleClose = this.handleClose.bind(this)
}
componentDidMount() {
}
handleClose() {
actions.viewer.hideSection('transcript')
}
render() {
const { viewer } = this.props
return (
<div className={viewer.transcript ? "transcript visible" : "transcript"}>
<div className='content'>
<ParagraphList
paragraphElementLookup={transcriptElementLookup}
onAnnotationClick={noop}
onParagraphDoubleClick={noop}
/>
</div>
<div
className='close'
onClick={this.handleClose}
/>
</div>
)
}
}
const mapStateToProps = state => ({
viewer: state.viewer,
})
const mapDispatchToProps = dispatch => ({
// uploadActions: bindActionCreators({ ...uploadActions }, dispatch),
})
export default connect(mapStateToProps, mapDispatchToProps)(Transcript)
|