PR comments

This commit is contained in:
Daniel Ternyak 2017-05-30 22:34:57 -05:00
parent 62dcec96d9
commit db70e17a67
3 changed files with 18 additions and 20 deletions

View File

@ -1,5 +1,5 @@
import React, {Component} from "react";
import translate from "translations";
import React, {Component} from 'react';
import translate from 'translations';
export default class Footer extends Component {

View File

@ -1,6 +1,6 @@
import React, {Component} from "react";
import {Link} from "react-router";
import translate from "translations";
import React, {Component} from 'react';
import {Link} from 'react-router';
import translate from 'translations';
const tabs = [
{
@ -27,13 +27,12 @@ const tabs = [
name: 'NAV_Help',
link: 'help'
}
]
];
export default class TabsOptions extends Component {
constructor(props) {
super(props)
super(props);
this.state = {
showLeftArrow: false,
showRightArrow: false
@ -49,7 +48,6 @@ export default class TabsOptions extends Component {
scrollRight() {
}
render() {
return (
<div>
@ -63,10 +61,12 @@ export default class TabsOptions extends Component {
<ul className='nav-inner'>
{
tabs.map((object, i) => {
// if the window pathname is the same or similar to the tab objects name, set the active toggle
let activeOrNot = (window.location.pathname === object.name || window.location.pathname.substring(1) === object.name) ? 'active' : '';
return (
<li className={`nav-item ${(window.location.pathname === object.link || window.location.pathname.substring(1) === object.link) ? 'active': ''}`}
<li className={`nav-item ${activeOrNot}`}
key={i} onClick={this.tabClick(i)}>
<Link to={object.link} key={i}
<Link to={object.link}
aria-label={`nav item: ${translate(object.name)}`}>
{translate(object.name)}
</Link>
@ -81,8 +81,7 @@ export default class TabsOptions extends Component {
this.state.showRightArrow &&
<a aria-hidden='true'
className='nav-arrow-right'
onClick={() => this.scrollRight(100)}>&#187;</a
>
onClick={() => this.scrollRight(100)}>&#187;</a>
}
</nav>
</div>

View File

@ -1,18 +1,17 @@
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {Field, reduxForm} from 'redux-form';
import GenerateWalletPasswordInputComponent from './GenerateWalletPasswordInputComponent';
import LedgerTrezorWarning from './LedgerTrezorWarning';
import translate from "translations";
import translate from 'translations';
// VALIDATORS
const minLength = min => value => {
return value && value.length < min ? `Must be ${min} characters or more` : undefined
}
const minLength9 = minLength(9)
const required = value => value ? undefined : 'Required'
};
const minLength9 = minLength(9);
const required = value => value ? undefined : 'Required';
class GenerateWalletPasswordComponent extends Component {
@ -41,8 +40,8 @@ class GenerateWalletPasswordComponent extends Component {
}
downloaded() {
let nextState = this.state
nextState.hasDownloadedWalletFile = true
let nextState = this.state;
nextState.hasDownloadedWalletFile = true;
this.setState(nextState)
}