Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
// SPDX-License-Identifier: MIT
import { withRouter } from 'react-router-dom';
@inject('tokensStore')
@observer
@withRouter
this.forceUpdate(); // TODO: I assume this is not the preferred way to do this!
const {
token,
tokensStore: { tokens }
} = this.props;
<TokenCard balance={null} showBalance={false} token={token}>
{tokens[token.address] ? (
<button
className='button -utility -bad'
onClick={this.handleRemoveToken}
>
Remove
</button>
) : (
<button
className='button -utility -good'
onClick={this.handleAddToken}
>
Add
</button>
)}
</li>
);
}
}
export default NewTokenItem;