diff --git a/src/components/Shell/Shell.tsx b/src/components/Shell/Shell.tsx index 806a709..1638fb2 100644 --- a/src/components/Shell/Shell.tsx +++ b/src/components/Shell/Shell.tsx @@ -122,8 +122,8 @@ export const Shell = ({ appNeedsUpdate, children, userPeerId }: ShellProps) => { setIsDrawerOpen(true) } - const handlePeerListOpen = () => { - setIsPeerListOpen(true) + const handlePeerListClick = () => { + setIsPeerListOpen(!isPeerListOpen) } const handleLinkButtonClick = async () => { @@ -138,10 +138,6 @@ export const Shell = ({ appNeedsUpdate, children, userPeerId }: ShellProps) => { setIsDrawerOpen(false) } - const handlePeerListClose = () => { - setIsPeerListOpen(false) - } - const handleHomeLinkClick = () => { setIsDrawerOpen(false) } @@ -184,7 +180,7 @@ export const Shell = ({ appNeedsUpdate, children, userPeerId }: ShellProps) => { isPeerListOpen={isPeerListOpen} numberOfPeers={numberOfPeers} title={title} - onPeerListOpen={handlePeerListOpen} + onPeerListClick={handlePeerListClick} /> { diff --git a/src/components/Shell/ShellAppBar.tsx b/src/components/Shell/ShellAppBar.tsx index 0ef3e5a..7c5ff10 100644 --- a/src/components/Shell/ShellAppBar.tsx +++ b/src/components/Shell/ShellAppBar.tsx @@ -50,7 +50,7 @@ interface ShellAppBarProps { isPeerListOpen: boolean numberOfPeers: number title: string - onPeerListOpen: () => void + onPeerListClick: () => void } export const ShellAppBar = ({ @@ -61,7 +61,7 @@ export const ShellAppBar = ({ isPeerListOpen, numberOfPeers, title, - onPeerListOpen, + onPeerListClick, }: ShellAppBarProps) => { return (