blob: d61eccd6cc3b49739391e75bf490fc9fce6d46c6 (
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
|
import React, { Component } from 'react'
import { connect } from 'react-redux'
import './align.css'
import Timeline from 'app/views/editor/timeline/timeline.container.js'
import Sidebar from 'app/views/editor/sidebar/sidebar.container.js'
class Container extends Component {
componentDidMount() {
document.body.scrollTo(0, 0)
document.body.parentNode.scrollTo(0, 0)
}
render() {
return (
<div className='body alignmentEditor'>
<div className='row'>
{this.props.peaks.length
? <Timeline />
: <div className="overview">No audio file loaded</div>}
</div>
<Sidebar />
</div>
)
}
}
const mapStateToProps = state => ({
peaks: state.align.peaks,
})
export default connect(mapStateToProps)(Container)
|