Rift.IO OSM R1 Initial Submission
[osm/UI.git] / skyquake / framework / widgets / skyquake_container / skyquakeComponent.jsx
diff --git a/skyquake/framework/widgets/skyquake_container/skyquakeComponent.jsx b/skyquake/framework/widgets/skyquake_container/skyquakeComponent.jsx
new file mode 100644 (file)
index 0000000..893a4c1
--- /dev/null
@@ -0,0 +1,18 @@
+import React from 'react';
+export default function(Component) {
+  class SkyquakeComponent extends React.Component {
+    constructor(props, context) {
+        super(props, context);
+        this.router = context.router;
+        this.actions = context.flux.actions.global;
+    }
+    render(props) {
+        return <Component {...this.props} router={this.router} actions={this.actions} flux={this.context.flux} />
+    }
+  }
+  SkyquakeComponent.contextTypes = {
+    router: React.PropTypes.object,
+    flux: React.PropTypes.object
+  };
+  return SkyquakeComponent;
+}