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

@@ -6,25 +6,12 @@ import { me } from '../initial_state'
import { CX } from '../constants'
import Button from './button'
const mapStateToProps = (state) => ({
notificationCount: !!me ? state.getIn(['notifications', 'unread']) : 0,
homeItemsQueueCount: !!me ? state.getIn(['timelines', 'home', 'totalQueuedItemsCount']) : 0,
})
export default
@withRouter
@connect(mapStateToProps)
class FooterBar extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
}
static propTypes = {
notificationCount: PropTypes.number.isRequired,
homeItemsQueueCount: PropTypes.number.isRequired,
}
render() {
const {
notificationCount,
@@ -133,3 +120,15 @@ class FooterBar extends React.PureComponent {
}
}
const mapStateToProps = (state) => ({
notificationCount: !!me ? state.getIn(['notifications', 'unread']) : 0,
homeItemsQueueCount: !!me ? state.getIn(['timelines', 'home', 'totalQueuedItemsCount']) : 0,
})
FooterBar.propTypes = {
notificationCount: PropTypes.number.isRequired,
homeItemsQueueCount: PropTypes.number.isRequired,
}
export default withRouter(connect(mapStateToProps)(FooterBar))