Skip to content

Commit

Permalink
chore(github): not using mapDispatchToProps in 2017 lul
Browse files Browse the repository at this point in the history
  • Loading branch information
balthazar committed Mar 18, 2017
1 parent aa26c71 commit a045034
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/widgets/Github.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@ import Select from 'react-select'
import { toggleLock } from 'actions/mode'
import languages from 'data/languages'

@connect()
@connect(null, { toggleLock })
class Github extends Component {

saveLanguage (data) {
const { onSave } = this.props
const { onSave, toggleLock } = this.props
const { config } = this.props.data
const language = data && data.value
this.props.dispatch(toggleLock(false))

toggleLock(false)
onSave({ ...config, language }, true)
}

blur () {
this.props.dispatch(toggleLock(false))
this.props.toggleLock(false)
}

focus () {
this.props.dispatch(toggleLock(true))
this.props.toggleLock(true)
}

render () {
Expand Down

0 comments on commit a045034

Please sign in to comment.