Finished updating the reformatting of propTypes and set redux, intl functions to end of component
• Finished: - updating the reformatting of propTypes and set redux, intl functions to end of component • Removed: - Gif implementation
This commit is contained in:
@@ -8,32 +8,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import Account from '../account'
|
||||
import PanelLayout from './panel_layout'
|
||||
|
||||
const messages = defineMessages({
|
||||
dismissSuggestion: { id: 'suggestions.dismiss', defaultMessage: 'Dismiss suggestion' },
|
||||
title: { id: 'who_to_follow.title', defaultMessage: 'Verified Accounts to Follow' },
|
||||
show_more: { id: 'who_to_follow.more', defaultMessage: 'Show more' },
|
||||
})
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
suggestions: state.getIn(['suggestions', 'verified', 'items']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
fetchPopularSuggestions: () => dispatch(fetchPopularSuggestions()),
|
||||
})
|
||||
|
||||
export default
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class VerifiedAccountsPanel extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
fetchPopularSuggestions: PropTypes.func.isRequired,
|
||||
intl: PropTypes.object.isRequired,
|
||||
suggestions: ImmutablePropTypes.list.isRequired,
|
||||
isLazy: PropTypes.bool,
|
||||
}
|
||||
|
||||
state = {
|
||||
fetched: !this.props.isLazy,
|
||||
}
|
||||
@@ -90,4 +66,27 @@ class VerifiedAccountsPanel extends ImmutablePureComponent {
|
||||
</PanelLayout>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const messages = defineMessages({
|
||||
dismissSuggestion: { id: 'suggestions.dismiss', defaultMessage: 'Dismiss suggestion' },
|
||||
title: { id: 'who_to_follow.title', defaultMessage: 'Verified Accounts to Follow' },
|
||||
show_more: { id: 'who_to_follow.more', defaultMessage: 'Show more' },
|
||||
})
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
suggestions: state.getIn(['suggestions', 'verified', 'items']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
fetchPopularSuggestions: () => dispatch(fetchPopularSuggestions()),
|
||||
})
|
||||
|
||||
VerifiedAccountsPanel.propTypes = {
|
||||
fetchPopularSuggestions: PropTypes.func.isRequired,
|
||||
intl: PropTypes.object.isRequired,
|
||||
suggestions: ImmutablePropTypes.list.isRequired,
|
||||
isLazy: PropTypes.bool,
|
||||
}
|
||||
|
||||
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(VerifiedAccountsPanel))
|
||||
Reference in New Issue
Block a user