Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
import React, { PureComponent } from 'react';
import { AccountHeader } from 'fether-ui';
import { accountsInfo$ } from '@parity/light.js';
import light from '@parity/light.js-react';
import { Link, Redirect, withRouter } from 'react-router-dom';
import Health from '../Health';
import TokensList from './TokensList';
import withAccount from '../utils/withAccount';
Axel Chalon
committed
@withRouter
class Tokens extends PureComponent {
handleGoToBackup = () => {
this.props.history.push(`/backup/${this.props.accountAddress}`);
this.props.history.push(`/whitelist/${this.props.accountAddress}`);
// If the accountsInfo object is empty (i.e. no accounts), then we redirect
// to the accounts page to create an account
if (accountsInfo && !Object.keys(accountsInfo).length) {
<button className='button -tiny' onClick={this.handleGoToBackup}>