Use Class and Property Decorators (#3730)
ref https://tc39.github.io/proposal-decorators/
This commit is contained in:
parent
0c44316b22
commit
c1a8e3d1eb
90 changed files with 168 additions and 274 deletions
|
@ -19,7 +19,16 @@ const mapStateToProps = state => ({
|
|||
accountIds: state.getIn(['user_lists', 'mutes', 'items']),
|
||||
});
|
||||
|
||||
class Mutes extends ImmutablePureComponent {
|
||||
@connect(mapStateToProps)
|
||||
@injectIntl
|
||||
export default class Mutes extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
params: PropTypes.object.isRequired,
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
accountIds: ImmutablePropTypes.list,
|
||||
intl: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
componentWillMount () {
|
||||
this.props.dispatch(fetchMutes());
|
||||
|
@ -59,12 +68,3 @@ class Mutes extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
Mutes.propTypes = {
|
||||
params: PropTypes.object.isRequired,
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
accountIds: ImmutablePropTypes.list,
|
||||
intl: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Mutes));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue