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
				
			
		| 
						 | 
				
			
			@ -15,7 +15,8 @@ const messages = defineMessages({
 | 
			
		|||
  report: { id: 'status.report', defaultMessage: 'Report @{name}' },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
class ActionBar extends React.PureComponent {
 | 
			
		||||
@injectIntl
 | 
			
		||||
export default class ActionBar extends React.PureComponent {
 | 
			
		||||
 | 
			
		||||
  static contextTypes = {
 | 
			
		||||
    router: PropTypes.object,
 | 
			
		||||
| 
						 | 
				
			
			@ -91,5 +92,3 @@ class ActionBar extends React.PureComponent {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default injectIntl(ActionBar);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,7 @@ const getHostname = url => {
 | 
			
		|||
  return parser.hostname;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class Card extends React.PureComponent {
 | 
			
		||||
export default class Card extends React.PureComponent {
 | 
			
		||||
 | 
			
		||||
  static propTypes = {
 | 
			
		||||
    card: ImmutablePropTypes.map,
 | 
			
		||||
| 
						 | 
				
			
			@ -97,5 +97,3 @@ class Card extends React.PureComponent {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default Card;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,7 @@ import { FormattedDate, FormattedNumber } from 'react-intl';
 | 
			
		|||
import CardContainer from '../containers/card_container';
 | 
			
		||||
import ImmutablePureComponent from 'react-immutable-pure-component';
 | 
			
		||||
 | 
			
		||||
class DetailedStatus extends ImmutablePureComponent {
 | 
			
		||||
export default class DetailedStatus extends ImmutablePureComponent {
 | 
			
		||||
 | 
			
		||||
  static contextTypes = {
 | 
			
		||||
    router: PropTypes.object,
 | 
			
		||||
| 
						 | 
				
			
			@ -87,5 +87,3 @@ class DetailedStatus extends ImmutablePureComponent {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default DetailedStatus;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,7 +48,9 @@ const makeMapStateToProps = () => {
 | 
			
		|||
  return mapStateToProps;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class Status extends ImmutablePureComponent {
 | 
			
		||||
@injectIntl
 | 
			
		||||
@connect(makeMapStateToProps)
 | 
			
		||||
export default class Status extends ImmutablePureComponent {
 | 
			
		||||
 | 
			
		||||
  static contextTypes = {
 | 
			
		||||
    router: PropTypes.object,
 | 
			
		||||
| 
						 | 
				
			
			@ -195,5 +197,3 @@ class Status extends ImmutablePureComponent {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default injectIntl(connect(makeMapStateToProps)(Status));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue