mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-14 03:54:11 +00:00
Remove React Fragments
This commit is contained in:
parent
a04757ab59
commit
277bbce179
@ -77,7 +77,7 @@ const KeyRing = ({
|
|||||||
const img = isWarning ? triangle : key
|
const img = isWarning ? triangle : key
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Block className={classes.root}>
|
<Block className={classes.root}>
|
||||||
<Block className={classes.key} style={keyStyle}>
|
<Block className={classes.key} style={keyStyle}>
|
||||||
<Img
|
<Img
|
||||||
@ -90,7 +90,7 @@ const KeyRing = ({
|
|||||||
</Block>
|
</Block>
|
||||||
{!hideDot && <Dot className={classes.dot} style={dotStyle} />}
|
{!hideDot && <Dot className={classes.dot} style={dotStyle} />}
|
||||||
</Block>
|
</Block>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ const ReviewComponent = ({ values, classes, network }: Props) => {
|
|||||||
const numOwners = getNumOwnersFrom(values)
|
const numOwners = getNumOwnersFrom(values)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<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}>
|
||||||
@ -151,18 +151,18 @@ const ReviewComponent = ({ values, classes, network }: Props) => {
|
|||||||
wallet. Make sure you have ETH in this wallet to fund this transaction.
|
wallet. Make sure you have ETH in this wallet to fund this transaction.
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Row>
|
</Row>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const ReviewPage = withStyles(styles)(ReviewComponent)
|
const ReviewPage = withStyles(styles)(ReviewComponent)
|
||||||
|
|
||||||
const Review = ({ network }: LayoutProps) => (controls: React.Node, { values }: Object) => (
|
const Review = ({ network }: LayoutProps) => (controls: React.Node, { values }: Object) => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<OpenPaper controls={controls} padding={false}>
|
<OpenPaper controls={controls} padding={false}>
|
||||||
<ReviewPage network={network} values={values} />
|
<ReviewPage network={network} values={values} />
|
||||||
</OpenPaper>
|
</OpenPaper>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
export default Review
|
export default Review
|
||||||
|
@ -33,7 +33,7 @@ const styles = () => ({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const SafeName = ({ classes }: Props) => (
|
const SafeName = ({ classes }: Props) => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Block margin="lg">
|
<Block margin="lg">
|
||||||
<Paragraph noMargin size="md" color="primary">
|
<Paragraph noMargin size="md" color="primary">
|
||||||
You are about to create a new Gnosis Safe wallet with one or more owners. First, let's give your new wallet
|
You are about to create a new Gnosis Safe wallet with one or more owners. First, let's give your new wallet
|
||||||
@ -67,7 +67,7 @@ const SafeName = ({ classes }: Props) => (
|
|||||||
Ethereum blockchain. These funds cannot be accessed by Gnosis at any point.
|
Ethereum blockchain. These funds cannot be accessed by Gnosis at any point.
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Block>
|
</Block>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
const SafeNameForm = withStyles(styles)(SafeName)
|
const SafeNameForm = withStyles(styles)(SafeName)
|
||||||
|
@ -72,7 +72,7 @@ type Props = {
|
|||||||
const Receive = ({
|
const Receive = ({
|
||||||
classes, onClose, safeAddress, safeName, etherScanLink,
|
classes, onClose, safeAddress, safeName, etherScanLink,
|
||||||
}: Props) => (
|
}: Props) => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Row align="center" grow className={classes.heading}>
|
<Row align="center" grow className={classes.heading}>
|
||||||
<Paragraph className={classes.manage} weight="bolder" noMargin>
|
<Paragraph className={classes.manage} weight="bolder" noMargin>
|
||||||
Receive funds
|
Receive funds
|
||||||
@ -110,7 +110,7 @@ const Receive = ({
|
|||||||
Done
|
Done
|
||||||
</Button>
|
</Button>
|
||||||
</Row>
|
</Row>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
export default withStyles(styles)(Receive)
|
export default withStyles(styles)(Receive)
|
||||||
|
@ -39,7 +39,7 @@ type Props = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ChooseTxType = ({ classes, onClose, setActiveScreen }: Props) => (
|
const ChooseTxType = ({ classes, onClose, setActiveScreen }: Props) => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Row align="center" grow className={classes.heading}>
|
<Row align="center" grow className={classes.heading}>
|
||||||
<Paragraph weight="bolder" className={classes.manage} noMargin>
|
<Paragraph weight="bolder" className={classes.manage} noMargin>
|
||||||
Send
|
Send
|
||||||
@ -72,7 +72,7 @@ const ChooseTxType = ({ classes, onClose, setActiveScreen }: Props) => (
|
|||||||
</Button>
|
</Button>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
export default withStyles(styles)(ChooseTxType)
|
export default withStyles(styles)(ChooseTxType)
|
||||||
|
@ -40,7 +40,7 @@ const Tokens = (props: Props) => {
|
|||||||
} = props
|
} = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Row align="center" grow className={classes.heading}>
|
<Row align="center" grow className={classes.heading}>
|
||||||
<Paragraph className={classes.manage} noMargin weight="bolder">
|
<Paragraph className={classes.manage} noMargin weight="bolder">
|
||||||
Manage Tokens
|
Manage Tokens
|
||||||
@ -72,7 +72,7 @@ const Tokens = (props: Props) => {
|
|||||||
tokens={tokens}
|
tokens={tokens}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,10 +119,10 @@ const AddCustomToken = (props: Props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<GnoForm onSubmit={handleSubmit} initialValues={formValues} testId={ADD_CUSTOM_TOKEN_FORM}>
|
<GnoForm onSubmit={handleSubmit} initialValues={formValues} testId={ADD_CUSTOM_TOKEN_FORM}>
|
||||||
{() => (
|
{() => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Block className={classes.formContainer}>
|
<Block className={classes.formContainer}>
|
||||||
<Paragraph noMargin className={classes.title} weight="bolder" size="lg">
|
<Paragraph noMargin className={classes.title} weight="bolder" size="lg">
|
||||||
Add custom token
|
Add custom token
|
||||||
@ -196,10 +196,10 @@ const AddCustomToken = (props: Props) => {
|
|||||||
Save
|
Save
|
||||||
</Button>
|
</Button>
|
||||||
</Row>
|
</Row>
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
</GnoForm>
|
</GnoForm>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ class Tokens extends React.Component<Props, State> {
|
|||||||
const filteredTokens = filterBy(filter, tokens)
|
const filteredTokens = filterBy(filter, tokens)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Block className={classes.root}>
|
<Block className={classes.root}>
|
||||||
<Row align="center" className={cn(classes.padding, classes.actions)}>
|
<Row align="center" className={cn(classes.padding, classes.actions)}>
|
||||||
<Search className={classes.search} />
|
<Search className={classes.search} />
|
||||||
@ -179,7 +179,7 @@ class Tokens extends React.Component<Props, State> {
|
|||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</MuiList>
|
</MuiList>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ const ReviewAddOwner = ({
|
|||||||
onSubmit()
|
onSubmit()
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Row align="center" grow className={classes.heading}>
|
<Row align="center" grow className={classes.heading}>
|
||||||
<Paragraph weight="bolder" className={classes.manage} noMargin>
|
<Paragraph weight="bolder" className={classes.manage} noMargin>
|
||||||
Add new owner
|
Add new owner
|
||||||
@ -97,7 +97,7 @@ const ReviewAddOwner = ({
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Row>
|
</Row>
|
||||||
<Hairline />
|
<Hairline />
|
||||||
{owners.map(owner => (
|
{owners.map((owner) => (
|
||||||
<React.Fragment key={owner.address}>
|
<React.Fragment key={owner.address}>
|
||||||
<Row className={classes.owner}>
|
<Row className={classes.owner}>
|
||||||
<Col xs={1} align="center">
|
<Col xs={1} align="center">
|
||||||
@ -169,7 +169,7 @@ const ReviewAddOwner = ({
|
|||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
</Row>
|
</Row>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ const ThresholdForm = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Row align="center" grow className={classes.heading}>
|
<Row align="center" grow className={classes.heading}>
|
||||||
<Paragraph weight="bolder" className={classes.manage} noMargin>
|
<Paragraph weight="bolder" className={classes.manage} noMargin>
|
||||||
Add new owner
|
Add new owner
|
||||||
@ -52,7 +52,7 @@ const ThresholdForm = ({
|
|||||||
<Hairline />
|
<Hairline />
|
||||||
<GnoForm onSubmit={handleSubmit} initialValues={{ threshold: threshold.toString() }}>
|
<GnoForm onSubmit={handleSubmit} initialValues={{ threshold: threshold.toString() }}>
|
||||||
{() => (
|
{() => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Block className={classes.formContainer}>
|
<Block className={classes.formContainer}>
|
||||||
<Row>
|
<Row>
|
||||||
<Paragraph weight="bolder" className={classes.headingText}>
|
<Paragraph weight="bolder" className={classes.headingText}>
|
||||||
@ -68,8 +68,8 @@ const ThresholdForm = ({
|
|||||||
<Col xs={2}>
|
<Col xs={2}>
|
||||||
<Field
|
<Field
|
||||||
name="threshold"
|
name="threshold"
|
||||||
render={props => (
|
render={(props) => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<SelectField {...props} disableError>
|
<SelectField {...props} disableError>
|
||||||
{[...Array(Number(owners.size + 1))].map((x, index) => (
|
{[...Array(Number(owners.size + 1))].map((x, index) => (
|
||||||
<MenuItem key={index} value={`${index + 1}`}>
|
<MenuItem key={index} value={`${index + 1}`}>
|
||||||
@ -82,7 +82,7 @@ const ThresholdForm = ({
|
|||||||
{props.meta.error}
|
{props.meta.error}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
validate={composeValidators(required, mustBeInteger, minValue(1), maxValue(owners.size + 1))}
|
validate={composeValidators(required, mustBeInteger, minValue(1), maxValue(owners.size + 1))}
|
||||||
data-testid="threshold-select-input"
|
data-testid="threshold-select-input"
|
||||||
@ -115,10 +115,10 @@ owner(s)
|
|||||||
Review
|
Review
|
||||||
</Button>
|
</Button>
|
||||||
</Row>
|
</Row>
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
</GnoForm>
|
</GnoForm>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ const EditOwnerComponent = ({
|
|||||||
<Hairline />
|
<Hairline />
|
||||||
<GnoForm onSubmit={handleSubmit}>
|
<GnoForm onSubmit={handleSubmit}>
|
||||||
{() => (
|
{() => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Block className={classes.container}>
|
<Block className={classes.container}>
|
||||||
<Row margin="md">
|
<Row margin="md">
|
||||||
<Field
|
<Field
|
||||||
@ -109,7 +109,7 @@ const EditOwnerComponent = ({
|
|||||||
Save
|
Save
|
||||||
</Button>
|
</Button>
|
||||||
</Row>
|
</Row>
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
</GnoForm>
|
</GnoForm>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
@ -58,7 +58,7 @@ const ReviewRemoveOwner = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Row align="center" grow className={classes.heading}>
|
<Row align="center" grow className={classes.heading}>
|
||||||
<Paragraph weight="bolder" className={classes.manage} noMargin>
|
<Paragraph weight="bolder" className={classes.manage} noMargin>
|
||||||
Replace owner
|
Replace owner
|
||||||
@ -112,7 +112,7 @@ const ReviewRemoveOwner = ({
|
|||||||
</Row>
|
</Row>
|
||||||
<Hairline />
|
<Hairline />
|
||||||
{owners.map(
|
{owners.map(
|
||||||
owner => owner.address !== ownerAddress && (
|
(owner) => owner.address !== ownerAddress && (
|
||||||
<React.Fragment key={owner.address}>
|
<React.Fragment key={owner.address}>
|
||||||
<Row className={classes.owner}>
|
<Row className={classes.owner}>
|
||||||
<Col xs={1} align="center">
|
<Col xs={1} align="center">
|
||||||
@ -215,7 +215,7 @@ const ReviewRemoveOwner = ({
|
|||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
</Row>
|
</Row>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,12 +14,11 @@ const SafeList = ({ safes, provider }: Props) => {
|
|||||||
const safesAvailable = safes && safes.count() > 0
|
const safesAvailable = safes && safes.count() > 0
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{ safesAvailable
|
{ safesAvailable
|
||||||
? <SafeTable safes={safes} />
|
? <SafeTable safes={safes} />
|
||||||
: <NoSafe provider={provider} text="No safes created, please create a new one" />
|
: <NoSafe provider={provider} text="No safes created, please create a new one" />}
|
||||||
}
|
</>
|
||||||
</React.Fragment>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user