refactor: remove return in effect of voice

This commit is contained in:
Tristan Yang
2023-04-03 10:43:19 +08:00
parent aac464fa25
commit 6472e52d4d
2 changed files with 16 additions and 10 deletions
+8 -3
View File
@@ -55,9 +55,14 @@ const VoiceChat = ({ id, context = "channel" }: Props) => {
<Tooltip disabled={visible} tip={t("voice")} placement="left">
<li className={`relative group`} >
<IconHeadphone className={visible ? "fill-gray-600" : "fill-gray-500"} role="button" onClick={joinedAtThisContext ? toggleDashboard : handleJoin} />
{visible ? null : memberCount > 0 ? <span className={`${badgeClass} flex-center font-bold text-[10px]`}>{memberCount}</span> : <span className={`${badgeClass} hidden text-xs group-hover:flex-center`}>
<em className='not-italic'>+</em>
</span>}
{visible ?
null
: <>
{memberCount > 0 && <span className={`${badgeClass} flex-center font-bold text-[10px] group-hover:invisible`}>{memberCount}</span>}
<span className={`${badgeClass} text-xs flex-center invisible group-hover:visible`}>
<em className='not-italic'>+</em>
</span>
</>}
</li>
</Tooltip>
);