blob: c2606d32d62d84a610cd44e6897b1f18afe72365 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import React from 'react'
import { connect } from 'react-redux'
import { VolumeOn, VolumeOff } from './audio.icons'
import actions from 'site/actions'
const MuteButton = ({ muted }) => (
<div className="mute" onClick={muted ? actions.audio.unmute : actions.audio.mute}>
{muted ? VolumeOff : VolumeOn}
</div>
)
const mapStateToProps = state => ({
muted: state.audio.muted,
})
export default connect(mapStateToProps)(MuteButton)
|