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) => {
if (guild === null) 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],
);
if (guild) {
return (
<div ref={rootRef} className="connection-info">
<div onClick={toggleContextMenu}>
<div ref={rootRef} className="connection-info" onClick={toggleContextMenu}>
<div>
<MemberElement guild={guild} member={displayMember} />
</div>
{contextMenu}