import { h, Component } from 'preact' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import * as audioPlayerActions from './audioPlayer.actions' class AudioPlayer extends Component { constructor(props){ super(props) this.handleClick = this.handleClick.bind(this) } handleClick(e){ const { audioPlayer, actions } = this.props if (audioPlayer.playing) { actions.pause() } else { actions.resume() } } render() { const { audioPlayer } = this.props return (