feat: close menu when navigating home

This commit is contained in:
Jeremy Kahn 2022-09-05 17:54:23 -05:00
parent 07cd343b10
commit 04549a8507

View File

@ -169,6 +169,10 @@ export const Shell = ({ children, userPeerId }: ShellProps) => {
setIsDrawerOpen(false)
}
const handleHomeLinkClick = () => {
setIsDrawerOpen(false)
}
const handleLinkButtonClick = async () => {
await navigator.clipboard.writeText(window.location.href)
@ -288,7 +292,7 @@ export const Shell = ({ children, userPeerId }: ShellProps) => {
</ListItem>
<Divider />
<List role="navigation">
<Link to="/">
<Link to="/" onClick={handleHomeLinkClick}>
<ListItem disablePadding>
<ListItemButton>
<ListItemIcon>