Commit 69e5584d by Johannes Schill

react-panel: Avoid duplicate keys

parent 97f7a7fb
...@@ -57,7 +57,7 @@ export class EditorTabBody extends PureComponent<Props, State> { ...@@ -57,7 +57,7 @@ export class EditorTabBody extends PureComponent<Props, State> {
renderMainSelection(view: EditorToolBarView) { renderMainSelection(view: EditorToolBarView) {
return ( return (
<div className="toolbar__main" onClick={() => this.onToggleToolBarView(view)} key={view.title}> <div className="toolbar__main" onClick={() => this.onToggleToolBarView(view)} key={view.title + view.icon}>
<img className="toolbar__main-image" src={view.imgSrc} /> <img className="toolbar__main-image" src={view.imgSrc} />
<div className="toolbar__main-name">{view.title}</div> <div className="toolbar__main-name">{view.title}</div>
<i className="fa fa-caret-down" /> <i className="fa fa-caret-down" />
...@@ -74,7 +74,7 @@ export class EditorTabBody extends PureComponent<Props, State> { ...@@ -74,7 +74,7 @@ export class EditorTabBody extends PureComponent<Props, State> {
}; };
return ( return (
<div className="nav-buttons" key={view.title}> <div className="nav-buttons" key={view.title + view.icon}>
<button className="btn navbar-button" onClick={onClick} disabled={view.disabled}> <button className="btn navbar-button" onClick={onClick} disabled={view.disabled}>
{view.icon && <i className={view.icon} />} {view.title} {view.icon && <i className={view.icon} />} {view.title}
</button> </button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment