Code coverage report for src/components/qa/index.cjsx

Statements: 50% (9 / 18)      Branches: 0% (0 / 6)      Functions: 0% (0 / 2)      Lines: 50% (9 / 18)      Ignored: none     

All files » src/components/qa/ » index.cjsx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43                                                                    
var BindStore, BookLink, EcosystemsActions, EcosystemsStore, LoadableItem, QADashboard, React, RouteHandler, ref;
 
React = require('react');
 
RouteHandler = require('react-router').RouteHandler;
 
ref = require('../../flux/ecosystems'), EcosystemsStore = ref.EcosystemsStore, EcosystemsActions = ref.EcosystemsActions;
 
LoadableItem = require('../loadable-item');
 
BindStore = require('../bind-store-mixin');
 
BookLink = require('./book-link');
 
QADashboard = React.createClass({displayName: "QADashboard",
  mixins: [BindStore],
  bindStore: EcosystemsStore,
  bindEvent: 'loaded',
  componentWillMount: function() {
    if (!EcosystemsStore.isLoading()) {
      return EcosystemsActions.load();
    }
  },
  contextTypes: {
    router: React.PropTypes.func
  },
  render: function() {
    var params;
    if (EcosystemsStore.isLoaded()) {
      params = _.clone(this.context.router.getCurrentParams());
      if (params.ecosystemId == null) {
        params.ecosystemId = "" + (EcosystemsStore.first().id);
      }
      return React.createElement(RouteHandler, React.__spread({}, params));
    } else {
      return React.createElement("h3", null, "Loading ...");
    }
  }
});
 
module.exports = QADashboard;