Skip to content

Commit

Permalink
Fix setting modal for pop sound
Browse files Browse the repository at this point in the history
  • Loading branch information
Xstoudi committed Oct 9, 2017
1 parent ee3ac00 commit 207144d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/script/components/modals/settings-modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class SettingsModal extends React.Component {
}

render() {
console.log(this.props)
return (
<div className={'modal-background' + ' ' + (this.props.openModal === 'settings' ? '' : 'hidden')}>
<div className='modal'>
Expand Down Expand Up @@ -45,7 +46,7 @@ class SettingsModal extends React.Component {
<div className='modal-label'>Fetch sound</div>
<div className='modal-input'>
<div className='modal-checkbox'>
<input type='checkbox' id='pop-sound' ref={ref => this._inputs.pop = ref} defaultValue={this.props.popOnFetch} />
<input type='checkbox' id='pop-sound' ref={ref => this._inputs.pop = ref} defaultChecked={this.props.popOnFetch} />
<label htmlFor='pop-sound'><span className='checkbox-border'><span /></span></label>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/script/reducers/settings-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const defaultState = {

export default function (state = defaultState, action) {
switch (action.type) {
case 'SET_SETTINGS': return action.payload
case 'SET_SETTINGS': return {...state, ...action.payload}
default: return state
}
}

0 comments on commit 207144d

Please sign in to comment.