mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-24 02:36:00 +00:00
22 lines
481 B
JavaScript
22 lines
481 B
JavaScript
import React from 'react';
|
|
import {connect} from 'react-redux';
|
|
|
|
|
|
class Repeat extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.handleClick = this.handleClick.bind(this);
|
|
}
|
|
handleClick() {
|
|
this.props.dispatch({type: 'TOGGLE_REPEAT'});
|
|
}
|
|
render() {
|
|
return <div
|
|
id='repeat'
|
|
className={this.props.repeat ? 'selected' : ''}
|
|
onClick={this.handleClick}
|
|
/>;
|
|
}
|
|
}
|
|
|
|
module.exports = connect((state) => state.media)(Repeat);
|