From a0450343d09f6f6ad96b79e8c2f01806774f2f94 Mon Sep 17 00:00:00 2001 From: Balthazar Gronon Date: Sat, 18 Mar 2017 15:31:36 -0700 Subject: [PATCH] chore(github): not using mapDispatchToProps in 2017 lul --- src/components/widgets/Github.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/widgets/Github.js b/src/components/widgets/Github.js index 9c70de7..2396b5b 100644 --- a/src/components/widgets/Github.js +++ b/src/components/widgets/Github.js @@ -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 () {