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 { inlineComponents } from './components.inline' class PlayerTranscript extends Component { constructor(props){ super(props) this.handleClose = this.handleClose.bind(this) this.handleAnnotationClick = this.handleAnnotationClick.bind(this) this.handleParagraphDoubleClick = this.handleParagraphDoubleClick.bind(this) this.handleScroll = this.handleScroll.bind(this) this.containerRef = React.createRef() } componentDidUpdate(prevProps) { if (this.props.section !== prevProps.section) { this.containerRef.current.scrollTo(0, 0) setTimeout(() => { this.containerRef.current.scrollTo(0, 0) }, 20) } } handleAnnotationClick(e, paragraph, annotation) { // console.log(annotation) actions.audio.seek(paragraph.start_ts) actions.audio.play() } handleParagraphDoubleClick(e, paragraph) { } handleClose() { } handleScroll(e) { if (this.props.viewer.growlOpen) { actions.viewer.closeGrowl() } } render() { const { paragraphs } = this.props.section return (