Beginning to reformat propTypes and set redux, intl functions to end of component files

• Beginning:
- to reformat propTypes and set redux, intl functions to end of component files
This commit is contained in:
mgabdev
2020-08-17 17:06:22 -05:00
parent 0a331ad389
commit 46a0cbca7d
28 changed files with 650 additions and 645 deletions

View File

@@ -4,18 +4,8 @@ import { connect } from 'react-redux'
import { clearCompose } from '../../actions/compose'
import ComposeFormContainer from './containers/compose_form_container'
const mapDispatchToProps = (dispatch) => ({
onClearCompose:() => dispatch(clearCompose())
})
export default
@connect(null, mapDispatchToProps)
class Compose extends React.PureComponent {
static propTypes = {
onClearCompose: PropTypes.func.isRequired,
}
componentWillUnmount() {
this.props.onClearCompose()
}
@@ -29,3 +19,13 @@ class Compose extends React.PureComponent {
}
}
const mapDispatchToProps = (dispatch) => ({
onClearCompose:() => dispatch(clearCompose())
})
Compose.propTypes = {
onClearCompose: PropTypes.func.isRequired,
}
export default connect(null, mapDispatchToProps)(Compose)