Add warn status type to rawStatus

pull/1081/head
Andrew Watkins 2017-03-30 11:12:02 -07:00
parent 5eae6463ca
commit 8f3d036951
1 changed files with 9 additions and 1 deletions

View File

@ -59,10 +59,18 @@ const RawQueryEditor = React.createClass({
value={value}
placeholder="Blank query"
/>
<div>{rawStatus && rawStatus.error || rawStatus.warn || rawStatus.success}</div>
{this.renderStatus(rawStatus)}
</div>
)
},
renderStatus(rawStatus) {
if (!rawStatus) {
return null
}
return <div>{rawStatus.error || rawStatus.warn || rawStatus.success}</div>
},
})
export default RawQueryEditor