Code coverage report for src/components/navbar/book-links.cjsx

Statements: 87.5% (14 / 16)      Branches: 75% (6 / 8)      Functions: 100% (1 / 1)      Lines: 87.5% (14 / 16)      Ignored: none     

All files » src/components/navbar/ » book-links.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 44                 99× 99× 99× 95×                                            
var BS, BookLinks, CourseStore, React;
 
React = require('react');
 
BS = require('react-bootstrap');
 
CourseStore = require('../../flux/course').CourseStore;
 
BookLinks = React.createClass({displayName: "BookLinks",
  PropTypes: {
    courseId: React.PropTypes.string
  },
  render: function() {
    var course, links;
    course = CourseStore.get(this.props.courseId);
    if (!(course != null ? course.is_concept_coach : void 0)) {
      return null;
    }
    links = [];
    Iif (course.book_pdf_url) {
      links.push(React.createElement("a", {
        "key": 'pdf',
        "target": '_blank',
        "href": course.book_pdf_url
      }, "Homework PDF"));
    }
    Iif (course.webview_url) {
      links.push(React.createElement("a", {
        "key": 'webview',
        "target": '_blank',
        "href": course.webview_url
      }, "Online Book ", React.createElement("i", {
        "className": 'fa fa-external-link'
      })));
    }
    return React.createElement("li", {
      "className": 'book-links'
    }, links);
  }
});
 
module.exports = BookLinks;