mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 17:47:16 +00:00
22 lines
531 B
JavaScript
22 lines
531 B
JavaScript
import React from "react";
|
|
import { connect } from "react-redux";
|
|
import classnames from "classnames";
|
|
|
|
import { toggleRepeat } from "../../actionCreators";
|
|
|
|
const Repeat = props =>
|
|
<div
|
|
id="repeat"
|
|
className={classnames({ selected: props.repeat })}
|
|
onClick={props.handleClick}
|
|
/>;
|
|
|
|
const mapStateToProps = state => ({
|
|
repeat: state.media.repeat
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
handleClick: () => dispatch(toggleRepeat())
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Repeat);
|