make USE_CATEGORIES optional

This commit is contained in:
Lachlan Kermode
2020-06-08 16:17:12 +02:00
parent 16358f5ab9
commit c473e4a998
6 changed files with 28 additions and 12 deletions

View File

@@ -53,10 +53,13 @@ class TimelineCategories extends React.Component {
render () {
const { dims } = this.props
const categories = this.props.features.USE_CATEGORIES
? this.props.categories.map((cat, idx) => this.renderCategory(cat, idx))
: this.renderCategory('Events', 0)
return (
<g class='yAxis'>
{this.props.categories.map((cat, idx) => this.renderCategory(cat, idx))}
{categories}
<rect
ref={this.grabRef}
class='drag-grabber'