From 41918a245e79e4edeccca55ea3b7f538bd6c1e38 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 27 Jul 2020 20:33:00 +0200 Subject: adding player transcript, for what its worth --- .../app/views/viewer/player/player.container.js | 25 ++++++++++------------ 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/player/player.container.js') diff --git a/animism-align/frontend/app/views/viewer/player/player.container.js b/animism-align/frontend/app/views/viewer/player/player.container.js index 3fa91b1..3c8c1e9 100644 --- a/animism-align/frontend/app/views/viewer/player/player.container.js +++ b/animism-align/frontend/app/views/viewer/player/player.container.js @@ -5,13 +5,16 @@ import { floatInRange } from 'app/utils' import actions from 'app/actions' +import PlayerTranscript from './player.transcript' + class PlayerContainer extends Component { state = { - currentSection: -1, + currentSection: null, } componentDidMount() { - this.setCurrentSection() + console.log(this.props.sections) + this.setState({ currentSection: this.props.sections[0] }) } componentDidUpdate(prevProps) { @@ -37,19 +40,19 @@ class PlayerContainer extends Component { return false }) if (!insideSection) { - this.setState({ - currentSection: sections[0], - }) + this.setState({ currentSection: sections[0] }) } } render() { - const { } = this.props + // const { } = this.props + const { currentSection } = this.state + if (!currentSection) { return
} + console.log(currentSection) return (
-
-
+
) } @@ -62,9 +65,3 @@ const mapStateToProps = state => ({ }) export default connect(mapStateToProps)(PlayerContainer) - -/* -- section name, number -- next link -- player -*/ -- cgit v1.2.3-70-g09d2