import React, { Component } from 'react' import { connect } from 'react-redux' import actions from 'app/actions' import { ROMAN_NUMERALS } from 'app/constants' import { timestamp } from 'app/utils' import { thumbnailURL, sectionProgressPercentage } from 'app/utils/annotation.utils' import { SpeakerIcon } from '../nav/viewer.icons' class ViewerSectionsList extends Component { constructor(props) { super(props) this.scrollRef = React.createRef() this.handleWheel = this.handleWheel.bind(this) } shouldComponentUpdate(nextProps) { if (nextProps.nav !== this.props.nav) return true return nextProps.nav } handleWheel(e) { let delta = Math.abs(e.deltaY) > Math.abs(e.deltaX) ? e.deltaY : e.deltaX this.scrollRef.current.scrollLeft += delta } render() { const { play_ts, sections, currentSection } = this.props return (