reformat/refactor

This commit is contained in:
Daniel Ternyak 2017-04-27 01:16:23 -05:00
parent fdc4bfa3b8
commit c5b6461631

View File

@ -1,16 +1,30 @@
import React, {Component} from "react";
import {Link} from "react-router";
const tabs = [
{"name": "Generate Wallet", "link": "/"},
{"name": "Send Ether & Tokens"},
{"name": "Swap"},
{"name": "Send Offline"},
{"name": "Contracts"},
{"name": "View Wallet", "link": "view-wallet"},
{"name": "Help"}
{
name: 'Generate Wallet',
link: '/'
},
{
name: 'Send Ether & Tokens'
},
{
name: 'Swap'
},
{
name: 'Send Offline'
},
{
name: 'Contracts'
},
{
name: 'View Wallet Info',
link: 'view-wallet'
},
{
name: 'Help'
}
]
export default class TabsOptions extends Component {
@ -35,33 +49,38 @@ export default class TabsOptions extends Component {
render() {
return (
<div>
<nav role="navigation" aria-label="main navigation" className="container nav-container overflowing">
{this.state.showLeftArrow && <a aria-hidden="true" className="nav-arrow-left"
onClick={() => this.scrollLeft(100)}>&#171;</a> }
<div className="nav-scroll">
<ul className="nav-inner">
{tabs.map((object, i) => {
return (
<Link to={object.link}>
<li className="nav-item"
<nav role='navigation' aria-label='main navigation' className='container nav-container overflowing'>
{
this.state.showLeftArrow && <a aria-hidden='true'
className='nav-arrow-left'
onClick={() => this.scrollLeft(100)}>&#171;</a>
}
<div className='nav-scroll'>
<ul className='nav-inner'>
{
tabs.map((object, i) => {
return (
<li className='nav-item'
key={i}
onClick={this.tabClick(i)}>
<a tabIndex="0" aria-label="nav item: {{tab.name | translate}}">
<Link to={object.link} key={i}
aria-label='nav item: {{tab.name | translate}}'>
{object.name}
</a>
</Link>
</li>
</Link>
)
}
)}
)
}
)
}
</ul>
</div>
{this.state.showRightArrow &&
<a aria-hidden="true" className="nav-arrow-right"
onClick={() => this.scrollRight(100)}
ng-mouseover="scrollHoverIn(false,2);" ng-mouseleave="scrollHoverOut()">&#187;</a
>}
{
this.state.showRightArrow &&
<a aria-hidden='true'
className='nav-arrow-right'
onClick={() => this.scrollRight(100)}
ng-mouseover='scrollHoverIn(false,2);' ng-mouseleave='scrollHoverOut()'>&#187;</a
>}
</nav>
</div>