update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b third try
[osm/UI.git] / skyquake / framework / widgets / skyquake_container / skyquakeComponent.jsx
1 import React from 'react';
2 export default function(Component) {
3   class SkyquakeComponent extends React.Component {
4     constructor(props, context) {
5         super(props, context);
6         this.router = context.router;
7         this.actions = context.flux.actions.global;
8     }
9     render(props) {
10         return <Component {...this.props} router={this.router} actions={this.actions} flux={this.context.flux}/>
11     }
12   }
13   SkyquakeComponent.contextTypes = {
14     router: React.PropTypes.object,
15     flux: React.PropTypes.object
16   };
17   return SkyquakeComponent;
18 }