remove all occurencies of settings url
This commit is contained in:
parent
1c8594d696
commit
c5861028fb
|
@ -7,7 +7,6 @@ import {
|
||||||
OPEN_ADDRESS,
|
OPEN_ADDRESS,
|
||||||
SAFE_PARAM_ADDRESS,
|
SAFE_PARAM_ADDRESS,
|
||||||
WELCOME_ADDRESS,
|
WELCOME_ADDRESS,
|
||||||
SETTINS_ADDRESS,
|
|
||||||
OPENING_ADDRESS,
|
OPENING_ADDRESS,
|
||||||
LOAD_ADDRESS,
|
LOAD_ADDRESS,
|
||||||
} from './routes'
|
} from './routes'
|
||||||
|
@ -23,9 +22,6 @@ const Opening = React.lazy(() => import('./opening/container'))
|
||||||
const Load = React.lazy(() => import('./load/container/Load'))
|
const Load = React.lazy(() => import('./load/container/Load'))
|
||||||
|
|
||||||
const SAFE_ADDRESS = `${SAFELIST_ADDRESS}/:${SAFE_PARAM_ADDRESS}`
|
const SAFE_ADDRESS = `${SAFELIST_ADDRESS}/:${SAFE_PARAM_ADDRESS}`
|
||||||
const SAFE_SETTINGS = `${SAFE_ADDRESS}${SETTINS_ADDRESS}`
|
|
||||||
|
|
||||||
export const settingsUrlFrom = (safeAddress: string) => `${SAFELIST_ADDRESS}/${safeAddress}${SETTINS_ADDRESS}`
|
|
||||||
|
|
||||||
const Routes = () => (
|
const Routes = () => (
|
||||||
<Switch>
|
<Switch>
|
||||||
|
|
|
@ -6,7 +6,6 @@ export const SAFELIST_ADDRESS = '/safes'
|
||||||
export const OPEN_ADDRESS = '/open'
|
export const OPEN_ADDRESS = '/open'
|
||||||
export const LOAD_ADDRESS = '/load'
|
export const LOAD_ADDRESS = '/load'
|
||||||
export const WELCOME_ADDRESS = '/welcome'
|
export const WELCOME_ADDRESS = '/welcome'
|
||||||
export const SETTINS_ADDRESS = '/settings'
|
|
||||||
export const OPENING_ADDRESS = '/opening'
|
export const OPENING_ADDRESS = '/opening'
|
||||||
|
|
||||||
export const stillInOpeningView = () => {
|
export const stillInOpeningView = () => {
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import Link from '~/components/layout/Link'
|
|
||||||
import AccountBalance from '@material-ui/icons/AccountBalance'
|
import AccountBalance from '@material-ui/icons/AccountBalance'
|
||||||
import Settings from '@material-ui/icons/Settings'
|
|
||||||
import Avatar from '@material-ui/core/Avatar'
|
import Avatar from '@material-ui/core/Avatar'
|
||||||
import Collapse from '@material-ui/core/Collapse'
|
import Collapse from '@material-ui/core/Collapse'
|
||||||
import IconButton from '@material-ui/core/IconButton'
|
import IconButton from '@material-ui/core/IconButton'
|
||||||
|
@ -20,10 +18,8 @@ import Button from '~/components/layout/Button'
|
||||||
import openHoc, { type Open } from '~/components/hoc/OpenHoc'
|
import openHoc, { type Open } from '~/components/hoc/OpenHoc'
|
||||||
import { type WithStyles } from '~/theme/mui'
|
import { type WithStyles } from '~/theme/mui'
|
||||||
import { type Token } from '~/logic/tokens/store/model/token'
|
import { type Token } from '~/logic/tokens/store/model/token'
|
||||||
import { settingsUrlFrom } from '~/routes'
|
|
||||||
|
|
||||||
type Props = Open & WithStyles & {
|
type Props = Open & WithStyles & {
|
||||||
safeAddress: string,
|
|
||||||
tokens: Map<string, Token>,
|
tokens: Map<string, Token>,
|
||||||
onMoveFunds: (token: Token) => void,
|
onMoveFunds: (token: Token) => void,
|
||||||
}
|
}
|
||||||
|
@ -37,10 +33,9 @@ const styles = {
|
||||||
export const MOVE_FUNDS_BUTTON_TEXT = 'Move'
|
export const MOVE_FUNDS_BUTTON_TEXT = 'Move'
|
||||||
|
|
||||||
const BalanceComponent = openHoc(({
|
const BalanceComponent = openHoc(({
|
||||||
open, toggle, tokens, classes, onMoveFunds, safeAddress,
|
open, toggle, tokens, classes, onMoveFunds,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const hasBalances = tokens.count() > 0
|
const hasBalances = tokens.count() > 0
|
||||||
const settingsUrl = settingsUrlFrom(safeAddress)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
@ -49,11 +44,6 @@ const BalanceComponent = openHoc(({
|
||||||
<AccountBalance />
|
<AccountBalance />
|
||||||
</Avatar>
|
</Avatar>
|
||||||
<ListItemText primary="Balance" secondary="List of different token balances" />
|
<ListItemText primary="Balance" secondary="List of different token balances" />
|
||||||
<ListItemIcon>
|
|
||||||
<IconButton to={settingsUrl} disabled={!hasBalances} component={Link} className={classes.button}>
|
|
||||||
<Settings />
|
|
||||||
</IconButton>
|
|
||||||
</ListItemIcon>
|
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
{open
|
{open
|
||||||
? <IconButton disableRipple><ExpandLess /></IconButton>
|
? <IconButton disableRipple><ExpandLess /></IconButton>
|
||||||
|
|
Loading…
Reference in New Issue