fix onclick listener in connection info status

This commit is contained in:
Michael Peters 2023-01-11 20:23:37 -08:00
parent 33d5987269
commit f2bb9ea316

View File

@ -39,15 +39,22 @@ const ConnectionInfo: FC = () => {
(close: () => void) => { (close: () => void) => {
if (guild === null) return null; if (guild === null) return null;
if (!isLoaded(selfMember)) return null; if (!isLoaded(selfMember)) return null;
return <ConnectionInfoContextMenu guild={guild} selfMember={selfMember.value} relativeToRef={rootRef} close={close} />; return (
<ConnectionInfoContextMenu
guild={guild}
selfMember={selfMember.value}
relativeToRef={rootRef}
close={close}
/>
);
}, },
[guild, selfMember], [guild, selfMember],
); );
if (guild) { if (guild) {
return ( return (
<div ref={rootRef} className="connection-info"> <div ref={rootRef} className="connection-info" onClick={toggleContextMenu}>
<div onClick={toggleContextMenu}> <div>
<MemberElement guild={guild} member={displayMember} /> <MemberElement guild={guild} member={displayMember} />
</div> </div>
{contextMenu} {contextMenu}