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)
|
||||
}
|
||||
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user