Add safe button handler in sidebar
This commit is contained in:
parent
64e5e55199
commit
a2bb2c2b5c
|
@ -8,6 +8,7 @@ import Drawer from '@material-ui/core/Drawer'
|
||||||
import SearchIcon from '@material-ui/icons/Search'
|
import SearchIcon from '@material-ui/icons/Search'
|
||||||
import Divider from '~/components/layout/Divider'
|
import Divider from '~/components/layout/Divider'
|
||||||
import Button from '~/components/layout/Button'
|
import Button from '~/components/layout/Button'
|
||||||
|
import Link from '~/components/layout/Link'
|
||||||
import Spacer from '~/components/Spacer'
|
import Spacer from '~/components/Spacer'
|
||||||
import Hairline from '~/components/layout/Hairline'
|
import Hairline from '~/components/layout/Hairline'
|
||||||
import Row from '~/components/layout/Row'
|
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 { safesListSelector } from '~/routes/safeList/store/selectors'
|
||||||
import useSidebarStyles from './style'
|
import useSidebarStyles from './style'
|
||||||
import SafeList from './SafeList'
|
import SafeList from './SafeList'
|
||||||
|
import { WELCOME_ADDRESS } from '~/routes/routes'
|
||||||
|
|
||||||
const { useState } = React
|
const { useState } = React
|
||||||
|
|
||||||
|
@ -94,7 +96,15 @@ const Sidebar = ({ children, safes }: SidebarProps) => {
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<Divider />
|
<Divider />
|
||||||
<Spacer />
|
<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
|
+ Add Safe
|
||||||
</Button>
|
</Button>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
|
|
Loading…
Reference in New Issue