From 499635ddf1cf67e75ab16a0c65426cf0b573fdcb Mon Sep 17 00:00:00 2001 From: DD Date: Mon, 11 Sep 2017 13:28:35 -0400 Subject: [PATCH] convert containers to mysterious non-components --- src/containers/fill-color-indicator.jsx | 18 ++---------------- src/containers/stroke-color-indicator.jsx | 18 ++---------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/src/containers/fill-color-indicator.jsx b/src/containers/fill-color-indicator.jsx index 6a3084ac..494be917 100644 --- a/src/containers/fill-color-indicator.jsx +++ b/src/containers/fill-color-indicator.jsx @@ -1,26 +1,12 @@ -import PropTypes from 'prop-types'; -import React from 'react'; import {connect} from 'react-redux'; import {changeFillColor} from '../reducers/fill-color'; import FillColorIndicatorComponent from '../components/fill-color-indicator.jsx'; -const FillColorIndicator = props => ( - -); - -FillColorIndicator.propTypes = { - fillColor: PropTypes.string.isRequired, - handleChangeFillColor: PropTypes.func.isRequired -}; - const mapStateToProps = state => ({ fillColor: state.scratchPaint.color.fillColor }); const mapDispatchToProps = dispatch => ({ - handleChangeFillColor: fillColor => { + onChangeFillColor: fillColor => { dispatch(changeFillColor(fillColor)); } }); @@ -28,4 +14,4 @@ const mapDispatchToProps = dispatch => ({ export default connect( mapStateToProps, mapDispatchToProps -)(FillColorIndicator); +)(FillColorIndicatorComponent); diff --git a/src/containers/stroke-color-indicator.jsx b/src/containers/stroke-color-indicator.jsx index 7e4baf67..add989bf 100644 --- a/src/containers/stroke-color-indicator.jsx +++ b/src/containers/stroke-color-indicator.jsx @@ -1,26 +1,12 @@ -import PropTypes from 'prop-types'; -import React from 'react'; import {connect} from 'react-redux'; import {changeStrokeColor} from '../reducers/stroke-color'; import StrokeColorIndicatorComponent from '../components/stroke-color-indicator.jsx'; -const StrokeColorIndicator = props => ( - -); - -StrokeColorIndicator.propTypes = { - handleChangeStrokeColor: PropTypes.func.isRequired, - strokeColor: PropTypes.string.isRequired -}; - const mapStateToProps = state => ({ strokeColor: state.scratchPaint.color.strokeColor }); const mapDispatchToProps = dispatch => ({ - handleChangeStrokeColor: strokeColor => { + onChangeStrokeColor: strokeColor => { dispatch(changeStrokeColor(strokeColor)); } }); @@ -28,4 +14,4 @@ const mapDispatchToProps = dispatch => ({ export default connect( mapStateToProps, mapDispatchToProps -)(StrokeColorIndicator); +)(StrokeColorIndicatorComponent);