Remove UUID as map key

Using the `type` key from `GRAPH_TYPES` which shouldn’t have any
conflicts because this component will not be visible at the same time
as other lists of graph types
pull/10616/head
Alex P 2018-04-18 13:15:45 -07:00
parent 2beef969b6
commit 8833b94651
1 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,6 @@ import React, {Component} from 'react'
import {Cell} from 'src/types/dashboard'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import uuid from 'uuid'
import {addDashboardCellAsync} from 'src/dashboards/actions'
import {GRAPH_TYPES} from 'src/dashboards/graphics/graph'
@ -41,7 +40,7 @@ class DashboardEmpty extends Component<Props> {
</p>
<div className="dashboard-empty--menu">
{GRAPH_TYPES.map(graphType => (
<div key={uuid.v4()} className="dashboard-empty--menu-option">
<div key={graphType.type} className="dashboard-empty--menu-option">
<div onClick={this.handleAddCell(graphType.type)}>
{graphType.graphic}
<p>{graphType.menuOption}</p>