WA-232 Adding add Token button
This commit is contained in:
parent
3919834f6d
commit
bca38c8c07
|
@ -4,6 +4,7 @@ import * as React from 'react'
|
||||||
import Block from '~/components/layout/Block'
|
import Block from '~/components/layout/Block'
|
||||||
import Col from '~/components/layout/Col'
|
import Col from '~/components/layout/Col'
|
||||||
import AccountBalanceWallet from '@material-ui/icons/AccountBalanceWallet'
|
import AccountBalanceWallet from '@material-ui/icons/AccountBalanceWallet'
|
||||||
|
import AddCircle from '@material-ui/icons/AddCircle'
|
||||||
import Link from '~/components/layout/Link'
|
import Link from '~/components/layout/Link'
|
||||||
import Bold from '~/components/layout/Bold'
|
import Bold from '~/components/layout/Bold'
|
||||||
import Img from '~/components/layout/Img'
|
import Img from '~/components/layout/Img'
|
||||||
|
@ -14,8 +15,8 @@ import { type Token } from '~/routes/tokens/store/model/token'
|
||||||
import { type SelectorProps } from '~/routes/tokens/container/selector'
|
import { type SelectorProps } from '~/routes/tokens/container/selector'
|
||||||
import { type Actions } from '~/routes/tokens/container/actions'
|
import { type Actions } from '~/routes/tokens/container/actions'
|
||||||
import { SAFELIST_ADDRESS } from '~/routes/routes'
|
import { SAFELIST_ADDRESS } from '~/routes/routes'
|
||||||
|
import AddToken from '~/routes/tokens/component/AddToken'
|
||||||
import TokenComponent from './Token'
|
import TokenComponent from './Token'
|
||||||
// import AddToken from '~/routes/tokens/component/AddToken'
|
|
||||||
// import RemoveToken from '~/routes/tokens/component/RemoveToken'
|
// import RemoveToken from '~/routes/tokens/component/RemoveToken'
|
||||||
|
|
||||||
const safeIcon = require('~/routes/safe/component/Safe/assets/gnosis_safe.svg')
|
const safeIcon = require('~/routes/safe/component/Safe/assets/gnosis_safe.svg')
|
||||||
|
@ -35,12 +36,13 @@ class TokenLayout extends React.PureComponent<TokenProps, State> {
|
||||||
state = {
|
state = {
|
||||||
component: undefined,
|
component: undefined,
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
onAddToken = () => {
|
|
||||||
const { addresses } = this.props
|
|
||||||
this.setState({ component: <AddToken/> })
|
|
||||||
}
|
|
||||||
|
|
||||||
|
onAddToken = () => () => {
|
||||||
|
const { addresses, safeAddress } = this.props
|
||||||
|
this.setState({ component: <AddToken tokens={addresses.toArray()} safeAddress={safeAddress} /> })
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
onRemoveToken = () => {
|
onRemoveToken = () => {
|
||||||
this.setState({ component: <RemoveToken /> })
|
this.setState({ component: <RemoveToken /> })
|
||||||
}
|
}
|
||||||
|
@ -82,6 +84,9 @@ class TokenLayout extends React.PureComponent<TokenProps, State> {
|
||||||
<IconButton to={`${SAFELIST_ADDRESS}/${safeAddress}`} component={Link}>
|
<IconButton to={`${SAFELIST_ADDRESS}/${safeAddress}`} component={Link}>
|
||||||
<AccountBalanceWallet />
|
<AccountBalanceWallet />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
<IconButton onClick={this.onAddToken}>
|
||||||
|
<AddCircle />
|
||||||
|
</IconButton>
|
||||||
<Bold>{name}</Bold>
|
<Bold>{name}</Bold>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Block>
|
</Block>
|
||||||
|
|
Loading…
Reference in New Issue