fixing eslint errors

This commit is contained in:
Mikhail Mikheev 2019-06-27 15:30:43 +04:00
parent 60ba580308
commit a27b4a3a47
5 changed files with 49 additions and 50 deletions

View File

@ -89,7 +89,6 @@ const CheckOwner = ({
</Button> </Button>
<Button <Button
type="submit" type="submit"
className={classes.button}
variant="contained" variant="contained"
minWidth={140} minWidth={140}
color="primary" color="primary"

View File

@ -1,6 +1,6 @@
// @flow // @flow
import { import {
lg, md, sm, background, lg, md, sm,
} from '~/theme/variables' } from '~/theme/variables'
export const styles = () => ({ export const styles = () => ({

View File

@ -10,13 +10,10 @@ import Identicon from '~/components/Identicon'
import Link from '~/components/layout/Link' import Link from '~/components/layout/Link'
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 GnoForm from '~/components/forms/GnoForm'
import Col from '~/components/layout/Col' 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 type { Owner } from '~/routes/safe/store/models/owner' import type { Owner } from '~/routes/safe/store/models/owner'
import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { getEtherScanLink } from '~/logic/wallets/getWeb3'
import { secondary } from '~/theme/variables' import { secondary } from '~/theme/variables'
@ -68,7 +65,7 @@ const ReviewRemoveOwner = ({
</IconButton> </IconButton>
</Row> </Row>
<Hairline /> <Hairline />
<Block className={classes.formContainer}> <Block>
<Row className={classes.root}> <Row className={classes.root}>
<Col xs={4} layout="column"> <Col xs={4} layout="column">
<Block className={classes.details}> <Block className={classes.details}>
@ -90,7 +87,13 @@ const ReviewRemoveOwner = ({
Any transaction requires the confirmation of: Any transaction requires the confirmation of:
</Paragraph> </Paragraph>
<Paragraph size="lg" color="primary" noMargin weight="bolder" className={classes.name}> <Paragraph size="lg" color="primary" noMargin weight="bolder" className={classes.name}>
{values.threshold} out of {owners.size - 1} owner(s) {values.threshold}
{' '}
out of
{' '}
{owners.size - 1}
{' '}
owner(s)
</Paragraph> </Paragraph>
</Block> </Block>
</Block> </Block>
@ -98,11 +101,14 @@ const ReviewRemoveOwner = ({
<Col xs={8} layout="column" className={classes.owners}> <Col xs={8} layout="column" className={classes.owners}>
<Row className={classes.ownersTitle}> <Row className={classes.ownersTitle}>
<Paragraph size="lg" color="primary" noMargin> <Paragraph size="lg" color="primary" noMargin>
{owners.size - 1} Safe owner(s) {owners.size - 1}
{' '}
Safe owner(s)
</Paragraph> </Paragraph>
</Row> </Row>
<Hairline /> <Hairline />
{owners.map(owner => owner.get('address') != ownerAddress && ( {owners.map(
owner => owner.address !== ownerAddress && (
<React.Fragment key={owner.get('address')}> <React.Fragment key={owner.get('address')}>
<Row className={classes.owner}> <Row className={classes.owner}>
<Col xs={1} align="center"> <Col xs={1} align="center">
@ -117,7 +123,11 @@ const ReviewRemoveOwner = ({
<Paragraph size="md" color="disabled" noMargin> <Paragraph size="md" color="disabled" noMargin>
{owner.get('address')} {owner.get('address')}
</Paragraph> </Paragraph>
<Link className={classes.open} to={getEtherScanLink(owner.get('address'), network)} target="_blank"> <Link
className={classes.open}
to={getEtherScanLink(owner.get('address'), network)}
target="_blank"
>
<OpenInNew style={openIconStyle} /> <OpenInNew style={openIconStyle} />
</Link> </Link>
</Block> </Block>
@ -126,7 +136,8 @@ const ReviewRemoveOwner = ({
</Row> </Row>
<Hairline /> <Hairline />
</React.Fragment> </React.Fragment>
))} ),
)}
<Row className={classes.info} align="center"> <Row className={classes.info} align="center">
<Paragraph weight="bolder" noMargin color="primary" size="md"> <Paragraph weight="bolder" noMargin color="primary" size="md">
REMOVING OWNER &darr; REMOVING OWNER &darr;

View File

@ -1,6 +1,6 @@
// @flow // @flow
import { import {
lg, md, sm, border, background, lg, sm, border, background,
} from '~/theme/variables' } from '~/theme/variables'
export const styles = () => ({ export const styles = () => ({

View File

@ -3,9 +3,9 @@ import React from 'react'
import { List } from 'immutable' import { List } from 'immutable'
import { withStyles } from '@material-ui/core/styles' import { withStyles } from '@material-ui/core/styles'
import Close from '@material-ui/icons/Close' import Close from '@material-ui/icons/Close'
import MenuItem from '@material-ui/core/MenuItem'
import IconButton from '@material-ui/core/IconButton' import IconButton from '@material-ui/core/IconButton'
import SelectField from '~/components/forms/SelectField' import SelectField from '~/components/forms/SelectField'
import MenuItem from '@material-ui/core/MenuItem'
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 GnoForm from '~/components/forms/GnoForm' import GnoForm from '~/components/forms/GnoForm'
@ -14,14 +14,9 @@ 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 Field from '~/components/forms/Field'
import TextField from '~/components/forms/TextField'
import type { Owner } from '~/routes/safe/store/models/owner' import type { Owner } from '~/routes/safe/store/models/owner'
import { import {
composeValidators, composeValidators, required, minValue, maxValue, mustBeInteger,
required,
minValue,
maxValue,
mustBeInteger,
} from '~/components/forms/validator' } from '~/components/forms/validator'
import { styles } from './style' import { styles } from './style'
@ -35,12 +30,7 @@ type Props = {
} }
const ThresholdForm = ({ const ThresholdForm = ({
classes, classes, onClose, owners, threshold, onClickBack, onSubmit,
onClose,
owners,
threshold,
onClickBack,
onSubmit,
}: Props) => { }: Props) => {
const handleSubmit = (values) => { const handleSubmit = (values) => {
onSubmit(values) onSubmit(values)
@ -60,8 +50,7 @@ const ThresholdForm = ({
</Row> </Row>
<Hairline /> <Hairline />
<GnoForm onSubmit={handleSubmit} initialValues={{ threshold: defaultThreshold.toString() }}> <GnoForm onSubmit={handleSubmit} initialValues={{ threshold: defaultThreshold.toString() }}>
{(...args) => { {() => {
const formState = args[2]
const numOptions = owners.size > 1 ? owners.size - 1 : 1 const numOptions = owners.size > 1 ? owners.size - 1 : 1
return ( return (
@ -80,7 +69,7 @@ const ThresholdForm = ({
<Row margin="xl" align="center" className={classes.inputRow}> <Row margin="xl" align="center" className={classes.inputRow}>
<Col xs={2}> <Col xs={2}>
<Field <Field
name={"threshold"} name="threshold"
render={props => ( render={props => (
<React.Fragment> <React.Fragment>
<SelectField {...props} disableError> <SelectField {...props} disableError>