Change sourceIndicator to receive a string instead of an object

pull/980/head
Alex P 2017-03-08 16:20:17 -08:00
parent 398b29a758
commit 9eec21e99d
1 changed files with 6 additions and 3 deletions

View File

@ -2,15 +2,18 @@ import React, {PropTypes} from 'react';
const SourceIndicator = React.createClass({
propTypes: {
source: PropTypes.shape({}).isRequired,
sourceName: PropTypes.string,
},
render() {
const {source} = this.props;
const {sourceName} = this.props;
if (!sourceName) {
return null;
}
return (
<div className="source-indicator">
<span className="icon server"></span>
{source && source.name}
{sourceName}
</div>
);
},