Refactor imports

This commit is contained in:
Germán Martínez 2019-06-11 14:09:16 +02:00
parent cf8427b89a
commit 905de7afab
4 changed files with 68 additions and 72 deletions

View File

@ -4,7 +4,7 @@ import { List } from 'immutable'
import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar'
import Modal from '~/components/Modal' import Modal from '~/components/Modal'
import { type Safe } from '~/routes/safe/store/models/safe' import { type Safe } from '~/routes/safe/store/models/safe'
import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' import { type Owner } from '~/routes/safe/store/models/owner'
import { setOwners } from '~/logic/safe/utils' import { setOwners } from '~/logic/safe/utils'
import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts'
import CheckOwner from './screens/CheckOwner' import CheckOwner from './screens/CheckOwner'

View File

@ -11,19 +11,10 @@ import Col from '~/components/layout/Col'
import Button from '~/components/layout/Button' import Button from '~/components/layout/Button'
import Block from '~/components/layout/Block' import Block from '~/components/layout/Block'
import Hairline from '~/components/layout/Hairline' import Hairline from '~/components/layout/Hairline'
import Field from '~/components/forms/Field'
import TextField from '~/components/forms/TextField'
import Link from '~/components/layout/Link' import Link from '~/components/layout/Link'
import Identicon from '~/components/Identicon' import Identicon from '~/components/Identicon'
import OpenInNew from '@material-ui/icons/OpenInNew' import OpenInNew from '@material-ui/icons/OpenInNew'
import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { getEtherScanLink } from '~/logic/wallets/getWeb3'
import {
composeValidators,
required,
mustBeEthereumAddress,
minMaxLength,
noErrorsOn,
} from '~/components/forms/validator'
import { styles } from './style' import { styles } from './style'
import { secondary } from '~/theme/variables' import { secondary } from '~/theme/variables'
@ -65,12 +56,6 @@ const CheckOwner = ({
</IconButton> </IconButton>
</Row> </Row>
<Hairline /> <Hairline />
<GnoForm onSubmit={handleSubmit}>
{(...args) => {
const formState = args[2]
return (
<React.Fragment>
<Block className={classes.formContainer}> <Block className={classes.formContainer}>
<Row margin="md"> <Row margin="md">
<Paragraph> <Paragraph>
@ -116,10 +101,6 @@ const CheckOwner = ({
</Row> </Row>
</React.Fragment> </React.Fragment>
) )
}}
</GnoForm>
</React.Fragment>
)
} }
export default withStyles(styles)(CheckOwner) export default withStyles(styles)(CheckOwner)

View File

@ -35,4 +35,10 @@ export const styles = () => ({
user: { user: {
justifyContent: 'left', justifyContent: 'left',
}, },
userName: {
whiteSpace: 'nowrap',
},
name: {
marginRight: `${sm}`,
},
}) })

View File

@ -1,20 +1,13 @@
// @flow // @flow
import React from 'react' import React from 'react'
import classNames from 'classnames'
import { List } from 'immutable' import { List } from 'immutable'
import { withStyles } from '@material-ui/core/styles' import { withStyles } from '@material-ui/core/styles'
import Identicon from '~/components/Identicon'
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 Field from '~/components/forms/Field'
import {
composeValidators, required, minMaxLength,
} from '~/components/forms/validator'
import Table from '~/components/Table' import Table from '~/components/Table'
import { type Column, cellWidth } from '~/components/Table/TableHead' import { type Column, cellWidth } from '~/components/Table/TableHead'
import TableRow from '@material-ui/core/TableRow' import TableRow from '@material-ui/core/TableRow'
import TableCell from '@material-ui/core/TableCell' import TableCell from '@material-ui/core/TableCell'
import TextField from '~/components/forms/TextField'
import Row from '~/components/layout/Row' import Row from '~/components/layout/Row'
import Paragraph from '~/components/layout/Paragraph' import Paragraph from '~/components/layout/Paragraph'
import Hairline from '~/components/layout/Hairline' import Hairline from '~/components/layout/Hairline'
@ -50,6 +43,7 @@ type Props = {
safeName: string, safeName: string,
owners: List<Owner>, owners: List<Owner>,
network: string, network: string,
threshold: number,
userAddress: string, userAddress: string,
createTransaction: Function, createTransaction: Function,
} }
@ -129,9 +123,24 @@ class ManageOwners extends React.Component<Props, State> {
))} ))}
<TableCell component="td"> <TableCell component="td">
<Row align="end" className={classes.actions}> <Row align="end" className={classes.actions}>
<img className={classes.editOwnerIcon} src={RenameOwnerIcon} onClick={this.onShow('EditOwner', row)} /> <img
<img className={classes.replaceOwnerIcon} src={ReplaceOwnerIcon} onClick={this.onShow('ReplaceOwner', row)} /> alt="Edit owner"
<img className={classes.removeOwnerIcon} src={RemoveOwnerIcon} onClick={this.onShow('RemoveOwner', row)} /> className={classes.editOwnerIcon}
src={RenameOwnerIcon}
onClick={this.onShow('EditOwner', row)}
/>
<img
alt="Replace owner"
className={classes.replaceOwnerIcon}
src={ReplaceOwnerIcon}
onClick={this.onShow('ReplaceOwner', row)}
/>
<img
alt="Remove owner"
className={classes.removeOwnerIcon}
src={RemoveOwnerIcon}
onClick={this.onShow('RemoveOwner', row)}
/>
</Row> </Row>
</TableCell> </TableCell>
</TableRow> </TableRow>