Remove switch statement

pull/1189/head
Andrew Watkins 2017-04-04 17:11:48 -07:00
parent 59281e2c1c
commit 982ff7d877
1 changed files with 4 additions and 6 deletions

View File

@ -103,13 +103,11 @@ const Visualization = React.createClass({
const activeQuery = queries[activeQueryIndex]
const defaultQuery = queries[0]
switch (view) {
case TABLE:
return this.renderTable(activeQuery || defaultQuery, heightPixels, onEditRawStatus)
case GRAPH:
default:
this.renderGraph(queries)
if (view === TABLE) {
return this.renderTable(activeQuery || defaultQuery, heightPixels, onEditRawStatus)
}
return this.renderGraph(queries)
},
renderTable(query, heightPixels, onEditRawStatus) {