per member tiles

This commit is contained in:
Timo
2024-11-04 12:23:51 +01:00
parent 34e9e8aec3
commit e1e202d7c8
11 changed files with 103 additions and 21 deletions

View File

@@ -117,6 +117,7 @@ interface RoomHeaderInfoProps {
avatarUrl: string | null;
encrypted: boolean;
participantCount: number | null;
nonMemberItemCount: number | null;
}
export const RoomHeaderInfo: FC<RoomHeaderInfoProps> = ({
@@ -125,6 +126,7 @@ export const RoomHeaderInfo: FC<RoomHeaderInfoProps> = ({
avatarUrl,
encrypted,
participantCount,
nonMemberItemCount,
}) => {
const { t } = useTranslation();
const size = useMediaQuery("(max-width: 550px)") ? "sm" : "lg";
@@ -157,7 +159,8 @@ export const RoomHeaderInfo: FC<RoomHeaderInfoProps> = ({
aria-label={t("header_participants_label")}
/>
<Text as="span" size="sm" weight="medium">
{t("participant_count", { count: participantCount ?? 0 })}
{t("participant_count", { count: participantCount ?? 0 })}{" "}
{(nonMemberItemCount ?? 0) > 0 && <>(+ {nonMemberItemCount})</>}
</Text>
</div>
)}