Add safe button handler in sidebar

This commit is contained in:
Mikhail Mikheev 2019-09-18 13:50:39 +04:00
parent 64e5e55199
commit a2bb2c2b5c
1 changed files with 11 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import Drawer from '@material-ui/core/Drawer'
import SearchIcon from '@material-ui/icons/Search'
import Divider from '~/components/layout/Divider'
import Button from '~/components/layout/Button'
import Link from '~/components/layout/Link'
import Spacer from '~/components/Spacer'
import Hairline from '~/components/layout/Hairline'
import Row from '~/components/layout/Row'
@ -15,6 +16,7 @@ import { type Safe } from '~/routes/safe/store/models/safe'
import { safesListSelector } from '~/routes/safeList/store/selectors'
import useSidebarStyles from './style'
import SafeList from './SafeList'
import { WELCOME_ADDRESS } from '~/routes/routes'
const { useState } = React
@ -94,7 +96,15 @@ const Sidebar = ({ children, safes }: SidebarProps) => {
<Spacer />
<Divider />
<Spacer />
<Button className={classes.addSafeBtn} variant="contained" size="small" color="primary">
<Button
component={Link}
to={WELCOME_ADDRESS}
className={classes.addSafeBtn}
variant="contained"
size="small"
color="primary"
onClick={toggleSidebar}
>
+ Add Safe
</Button>
<Spacer />