Code coverage report for src/components/course-calendar/index.cjsx

Statements: 100% (13 / 13)      Branches: 100% (2 / 2)      Functions: 100% (2 / 2)      Lines: 100% (13 / 13)      Ignored: none     

All files » src/components/course-calendar/ » 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                         13×         41× 41× 41× 41× 41×                
var CourseCalendar, CourseMonth, React, displayAs, moment;
 
moment = require('moment');
 
React = require('react');
 
CourseMonth = require('./month');
 
displayAs = {
  month: CourseMonth
};
 
CourseCalendar = React.createClass({
  displayName: 'CourseCalendar',
  propTypes: {
    loadPlansList: React.PropTypes.func
  },
  getInitialState: function() {
    return {
      displayAs: 'month'
    };
  },
  render: function() {
    var Handler, loadPlansList, plansList;
    Handler = displayAs[this.state.displayAs];
    loadPlansList = this.props.loadPlansList;
    plansList = typeof loadPlansList === "function" ? loadPlansList() : void 0;
    return React.createElement(Handler, React.__spread({}, this.props, {
      "plansList": plansList,
      "ref": 'calendarHandler'
    }));
  }
});
 
module.exports = CourseCalendar;