Continuing updating the reformatting of propTypes and set redux, intl functions to end of component

• Removing:
- the reformatting of propTypes and set redux, intl functions to end of component
This commit is contained in:
mgabdev
2020-08-17 19:57:35 -05:00
parent 46a0cbca7d
commit ddca693cfc
101 changed files with 2053 additions and 2140 deletions

View File

@@ -3,20 +3,12 @@ import PropTypes from 'prop-types'
import { CX } from '../constants'
import Button from './button'
export default class BackButton extends React.PureComponent {
class BackButton extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
}
static propTypes = {
className: PropTypes.string,
icon: PropTypes.string,
iconClassName: PropTypes.string,
iconSize: PropTypes.string,
toHome: PropTypes.bool,
}
historyBack = () => {
if (window.history && window.history.length === 1 || this.props.toHome) {
this.context.router.history.push('/home')
@@ -62,3 +54,13 @@ export default class BackButton extends React.PureComponent {
}
}
BackButton.propTypes = {
className: PropTypes.string,
icon: PropTypes.string,
iconClassName: PropTypes.string,
iconSize: PropTypes.string,
toHome: PropTypes.bool,
}
export default BackButton