Commit 423b719b authored by Amaury Martiny's avatar Amaury Martiny
Browse files

Change whitelist page behavior

parent 750b9045
Pipeline #44256 canceled with stages
......@@ -6,18 +6,22 @@
import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import { TokenCard } from 'fether-ui';
import { withRouter } from 'react-router-dom';
@withRouter
@inject('tokensStore')
@observer
class NewTokenItem extends Component {
handleAddToken = () => {
const { token, tokensStore } = this.props;
const { history, token, tokensStore } = this.props;
tokensStore.addToken(token.address, token);
history.goBack();
};
handleRemoveToken = () => {
const { token, tokensStore } = this.props;
const { history, token, tokensStore } = this.props;
tokensStore.removeToken(token.address);
history.goBack();
};
render () {
......
......@@ -9,7 +9,6 @@ import debounce from 'lodash/debounce';
import { Header } from 'fether-ui';
import { inject, observer } from 'mobx-react';
import light from 'light-hoc';
import { Link } from 'react-router-dom';
import Health from '../Health';
import NewTokenItem from './NewTokenItem';
......@@ -96,17 +95,18 @@ class Whitelist extends Component {
};
render () {
const { history } = this.props;
const { matches, search } = this.state;
return (
<div>
<Header
left={
<Link to='/tokens' className='icon -close'>
<a to='/tokens' className='icon -close' onClick={history.goBack}>
Close
</Link>
</a>
}
title={<h1>My tokens</h1>}
title={<h1>Search tokens</h1>}
/>
<div className='window_content'>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment