feat: close menu when navigating home
This commit is contained in:
parent
07cd343b10
commit
04549a8507
@ -169,6 +169,10 @@ export const Shell = ({ children, userPeerId }: ShellProps) => {
|
|||||||
setIsDrawerOpen(false)
|
setIsDrawerOpen(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleHomeLinkClick = () => {
|
||||||
|
setIsDrawerOpen(false)
|
||||||
|
}
|
||||||
|
|
||||||
const handleLinkButtonClick = async () => {
|
const handleLinkButtonClick = async () => {
|
||||||
await navigator.clipboard.writeText(window.location.href)
|
await navigator.clipboard.writeText(window.location.href)
|
||||||
|
|
||||||
@ -288,7 +292,7 @@ export const Shell = ({ children, userPeerId }: ShellProps) => {
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
<Divider />
|
<Divider />
|
||||||
<List role="navigation">
|
<List role="navigation">
|
||||||
<Link to="/">
|
<Link to="/" onClick={handleHomeLinkClick}>
|
||||||
<ListItem disablePadding>
|
<ListItem disablePadding>
|
||||||
<ListItemButton>
|
<ListItemButton>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
|
Loading…
Reference in New Issue
Block a user