Adding History Back on Open layout

This commit is contained in:
apanizo 2018-09-24 16:27:16 +02:00
parent def45c383c
commit eda63553b1
1 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import SafeFields, { safeFieldsValidation } from '~/routes/open/components/SafeF
import SafeNameField from '~/routes/open/components/SafeNameForm' import SafeNameField from '~/routes/open/components/SafeNameForm'
import { SAFELIST_ADDRESS } from '~/routes/routes' import { SAFELIST_ADDRESS } from '~/routes/routes'
import Link from '~/components/layout/Link' import Link from '~/components/layout/Link'
import { history } from '~/store'
import { secondary } from '~/theme/variables' import { secondary } from '~/theme/variables'
const getSteps = () => [ const getSteps = () => [
@ -36,6 +37,10 @@ const iconStyle = {
height: '32px', height: '32px',
} }
const back = () => {
history.goBack()
}
const Layout = ({ const Layout = ({
provider, userAccount, safeAddress, safeTx, onCallSafeContractSubmit, provider, userAccount, safeAddress, safeTx, onCallSafeContractSubmit,
}: Props) => { }: Props) => {
@ -49,7 +54,7 @@ const Layout = ({
? ( ? (
<Block> <Block>
<Row align="center"> <Row align="center">
<IconButton style={iconStyle} disableRipple> <IconButton onClick={back} style={iconStyle} disableRipple>
<ChevronLeft /> <ChevronLeft />
</IconButton> </IconButton>
<Heading tag="h2">Create New Safe</Heading> <Heading tag="h2">Create New Safe</Heading>