Add swap link; fix activeOrNot nav option selection.

This commit is contained in:
Daniel Ternyak 2017-06-11 20:08:48 -05:00
parent ee8c411c4e
commit df3ddd7351
1 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,8 @@ const tabs = [
name: 'NAV_SendEther'
},
{
name: 'NAV_Swap'
name: 'NAV_Swap',
link: 'swap'
},
{
name: 'NAV_Offline'
@ -62,7 +63,7 @@ export default class TabsOptions extends Component {
{
tabs.map((object, i) => {
// if the window pathname is the same or similar to the tab objects name, set the active toggle
const activeOrNot = (window.location.pathname === object.name || window.location.pathname.substring(1) === object.name) ? 'active' : '';
const activeOrNot = (window.location.pathname === object.link || window.location.pathname.substring(1) === object.link) ? 'active' : '';
return (
<li className={`nav-item ${activeOrNot}`}
key={i} onClick={this.tabClick(i)}>