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 typespull/10616/head
parent
2beef969b6
commit
8833b94651
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue