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