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:
@@ -7,24 +7,8 @@ import { makeGetAccount } from '../selectors'
|
||||
import Avatar from './avatar'
|
||||
import DisplayName from './display_name'
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const getAccount = makeGetAccount()
|
||||
|
||||
const mapStateToProps = (state, { id }) => ({
|
||||
account: getAccount(state, id),
|
||||
})
|
||||
|
||||
return mapStateToProps
|
||||
}
|
||||
|
||||
export default
|
||||
@connect(makeMapStateToProps)
|
||||
class AutosuggestAccount extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
account: ImmutablePropTypes.map.isRequired,
|
||||
}
|
||||
|
||||
render () {
|
||||
const { account } = this.props
|
||||
|
||||
@@ -42,3 +26,13 @@ class AutosuggestAccount extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const mapStateToProps = () => ({
|
||||
account: makeGetAccount()(state, id),
|
||||
})
|
||||
|
||||
AutosuggestAccount.propTypes = {
|
||||
account: ImmutablePropTypes.map.isRequired,
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(AutosuggestAccount)
|
||||
Reference in New Issue
Block a user