refactor: split signers and viewers in the users section

This commit is contained in:
enes 2024-08-30 12:55:04 +02:00
parent f8533b0ffd
commit bee566424d

View File

@ -118,6 +118,14 @@ export const UsersDetails = ({ meta }: UsersDetailsProps) => {
</Tooltip> </Tooltip>
) )
})} })}
</UserAvatarGroup>
</div>
{viewers.length > 0 && (
<>
<p>Viewers</p>
<div className={styles.users}>
<UserAvatarGroup max={20}>
{viewers.map((signer) => { {viewers.map((signer) => {
const pubkey = npubToHex(signer)! const pubkey = npubToHex(signer)!
const profile = profiles[pubkey] const profile = profiles[pubkey]
@ -126,7 +134,9 @@ export const UsersDetails = ({ meta }: UsersDetailsProps) => {
<Tooltip <Tooltip
key={signer} key={signer}
title={ title={
profile?.display_name || profile?.name || shorten(pubkey) profile?.display_name ||
profile?.name ||
shorten(pubkey)
} }
placement="top" placement="top"
arrow arrow
@ -144,6 +154,8 @@ export const UsersDetails = ({ meta }: UsersDetailsProps) => {
})} })}
</UserAvatarGroup> </UserAvatarGroup>
</div> </div>
</>
)}
</div> </div>
<div className={styles.section}> <div className={styles.section}>
<p>Details</p> <p>Details</p>