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
|
@ -3,7 +3,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import Permalink from '../../../components/permalink';
|
||||
|
||||
class MediaItem extends ImmutablePureComponent {
|
||||
export default class MediaItem extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
media: ImmutablePropTypes.map.isRequired,
|
||||
|
@ -37,5 +37,3 @@ class MediaItem extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default MediaItem;
|
||||
|
|
|
@ -22,7 +22,8 @@ const mapStateToProps = (state, props) => ({
|
|||
autoPlayGif: state.getIn(['meta', 'auto_play_gif']),
|
||||
});
|
||||
|
||||
class AccountGallery extends ImmutablePureComponent {
|
||||
@connect(mapStateToProps)
|
||||
export default class AccountGallery extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
params: PropTypes.object.isRequired,
|
||||
|
@ -111,5 +112,3 @@ class AccountGallery extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(AccountGallery);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue