add route linking to tabs

This commit is contained in:
Daniel Ternyak 2017-04-26 23:03:46 -05:00
parent 0c457c8e82
commit 20c256fc77
1 changed files with 14 additions and 9 deletions

View File

@ -1,12 +1,14 @@
import React, {Component} from "react"; import React, {Component} from "react";
import {Link} from "react-router";
const tabs = [ const tabs = [
{"name": "Generate Wallet"}, {"name": "Generate Wallet", "link": "/"},
{"name": "Send Ether & Tokens"}, {"name": "Send Ether & Tokens"},
{"name": "Swap"}, {"name": "Swap"},
{"name": "Send Offline"}, {"name": "Send Offline"},
{"name": "Contracts"}, {"name": "Contracts"},
{"name": "View Wallet"}, {"name": "View Wallet", "link": "view-wallet"},
{"name": "Help"} {"name": "Help"}
] ]
@ -40,6 +42,7 @@ export default class TabsOptions extends Component {
<ul className="nav-inner"> <ul className="nav-inner">
{tabs.map((object, i) => { {tabs.map((object, i) => {
return ( return (
<Link to={object.link}>
<li className="nav-item" <li className="nav-item"
key={i} key={i}
onClick={this.tabClick(i)}> onClick={this.tabClick(i)}>
@ -47,6 +50,8 @@ export default class TabsOptions extends Component {
{object.name} {object.name}
</a> </a>
</li> </li>
</Link>
) )
} }
)} )}