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

@@ -13,45 +13,8 @@ import { openPopover, closePopover } from '../actions/popover'
import Icon from './icon'
import Text from './text'
const mapDispatchToProps = (dispatch) => ({
openUserInfoPopover(props) {
dispatch(openPopover(POPOVER_USER_INFO, props))
},
closeUserInfoPopover() {
dispatch(closePopover(POPOVER_USER_INFO))
}
})
export default
@connect(null, mapDispatchToProps)
class DisplayName extends ImmutablePureComponent {
static propTypes = {
account: ImmutablePropTypes.map,
openUserInfoPopover: PropTypes.func.isRequired,
closeUserInfoPopover: PropTypes.func.isRequired,
isLarge: PropTypes.bool,
isMultiline: PropTypes.bool,
isSmall: PropTypes.bool,
noHover: PropTypes.bool,
noRelationship: PropTypes.bool,
noUsername: PropTypes.bool,
isComment: PropTypes.bool,
isCentered: PropTypes.bool,
}
updateOnProps = [
'account',
'isMultiline',
'isSmall',
'isLarge',
'noHover',
'noRelationship',
'noUsername',
'isComment',
'isCentered',
]
mouseOverTimeout = null
componentWillUnmount () {
@@ -224,3 +187,28 @@ class DisplayName extends ImmutablePureComponent {
}
}
const mapDispatchToProps = (dispatch) => ({
openUserInfoPopover(props) {
dispatch(openPopover(POPOVER_USER_INFO, props))
},
closeUserInfoPopover() {
dispatch(closePopover(POPOVER_USER_INFO))
}
})
DisplayName.propTypes = {
account: ImmutablePropTypes.map,
openUserInfoPopover: PropTypes.func.isRequired,
closeUserInfoPopover: PropTypes.func.isRequired,
isLarge: PropTypes.bool,
isMultiline: PropTypes.bool,
isSmall: PropTypes.bool,
noHover: PropTypes.bool,
noRelationship: PropTypes.bool,
noUsername: PropTypes.bool,
isComment: PropTypes.bool,
isCentered: PropTypes.bool,
}
export default (connect(null, mapDispatchToProps)(DisplayName))