WA-232 Enabling navigation from settings to safe
This commit is contained in:
parent
3afefea0a7
commit
ece4e4a5bf
|
@ -50,7 +50,7 @@ const BalanceComponent = openHoc(({
|
|||
</Avatar>
|
||||
<ListItemText primary="Balance" secondary="List of different token balances" />
|
||||
<ListItemIcon>
|
||||
<IconButton to={settingsUrl} component={Link} className={classes.button} aria-label="Delete">
|
||||
<IconButton to={settingsUrl} component={Link} className={classes.button}>
|
||||
<Settings />
|
||||
</IconButton>
|
||||
</ListItemIcon>
|
||||
|
|
|
@ -3,13 +3,17 @@ import MuiList from '@material-ui/core/List'
|
|||
import * as React from 'react'
|
||||
import Block from '~/components/layout/Block'
|
||||
import Col from '~/components/layout/Col'
|
||||
import AccountBalanceWallet from '@material-ui/icons/AccountBalanceWallet'
|
||||
import Link from '~/components/layout/Link'
|
||||
import Bold from '~/components/layout/Bold'
|
||||
import Img from '~/components/layout/Img'
|
||||
import IconButton from '@material-ui/core/IconButton'
|
||||
import Paragraph from '~/components/layout/Paragraph'
|
||||
import Row from '~/components/layout/Row'
|
||||
import { type Token } from '~/routes/tokens/store/model/token'
|
||||
import { type SelectorProps } from '~/routes/tokens/container/selector'
|
||||
import { type Actions } from '~/routes/tokens/container/actions'
|
||||
import { SAFELIST_ADDRESS } from '~/routes/routes'
|
||||
import TokenComponent from './Token'
|
||||
// import AddToken from '~/routes/tokens/component/AddToken'
|
||||
// import RemoveToken from '~/routes/tokens/component/RemoveToken'
|
||||
|
@ -56,7 +60,7 @@ class TokenLayout extends React.PureComponent<TokenProps, State> {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { safe, tokens } = this.props
|
||||
const { safe, safeAddress, tokens } = this.props
|
||||
const { component } = this.state
|
||||
const name = safe ? safe.get('name') : ''
|
||||
|
||||
|
@ -75,6 +79,9 @@ class TokenLayout extends React.PureComponent<TokenProps, State> {
|
|||
<Col sm={12} center="xs" md={7} margin="xl" layout="column">
|
||||
<Block margin="xl">
|
||||
<Paragraph size="lg" noMargin align="right">
|
||||
<IconButton to={`${SAFELIST_ADDRESS}/${safeAddress}`} component={Link}>
|
||||
<AccountBalanceWallet />
|
||||
</IconButton>
|
||||
<Bold>{name}</Bold>
|
||||
</Paragraph>
|
||||
</Block>
|
||||
|
|
|
@ -8,7 +8,6 @@ import selector, { type SelectorProps } from './selector'
|
|||
import actions, { type Actions } from './actions'
|
||||
|
||||
type Props = Actions & SelectorProps & {
|
||||
safeAddress: string,
|
||||
fetchTokens: typeof fetchTokens,
|
||||
}
|
||||
|
||||
|
@ -23,7 +22,7 @@ class TokensView extends React.PureComponent<Props> {
|
|||
|
||||
render() {
|
||||
const {
|
||||
tokens, addresses, safe, disableToken, enableToken,
|
||||
tokens, addresses, safe, safeAddress, disableToken, enableToken,
|
||||
} = this.props
|
||||
|
||||
return (
|
||||
|
@ -32,6 +31,7 @@ class TokensView extends React.PureComponent<Props> {
|
|||
tokens={tokens}
|
||||
addresses={addresses}
|
||||
safe={safe}
|
||||
safeAddress={safeAddress}
|
||||
disableToken={disableToken}
|
||||
enableToken={enableToken}
|
||||
/>
|
||||
|
|
|
@ -10,6 +10,7 @@ export type SelectorProps = {
|
|||
tokens: List<Token>,
|
||||
addresses: List<String>,
|
||||
safe: Safe,
|
||||
safeAddress: string,
|
||||
}
|
||||
|
||||
export default createStructuredSelector({
|
||||
|
|
Loading…
Reference in New Issue