var React = require('react/addons') var CodeViewer = require('../../main/Components/CodeViewer') var Markdown = require('../../main/Mixins/Markdown') module.exports = React.createClass({ mixins: [Markdown], propTypes: { currentArticle: React.PropTypes.object }, render: function () { var article = this.props.currentArticle if (article != null) { if (article.type === 'code') { return (
{article.description}
) } else if (article.type === 'note') { return (
{article.title}
) } } return (
Nothing selected
) } })