Skip to content

Commit

Permalink
Added Divider along with Display count and total count of members
Browse files Browse the repository at this point in the history
  • Loading branch information
dhairyashiil committed Jan 6, 2025
1 parent 6d0d0a6 commit b5b982c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/react/src/views/RoomMembers/RoomMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Input,
Popup,
StaticSelect,
Divider,
useComponentOverrides,
useTheme,
} from '@embeddedchat/ui-elements';
Expand Down Expand Up @@ -108,6 +109,9 @@ const RoomMembers = ({ members }) => {
setViewStatus(value);
};

const totalMembers = members.length;
const displayedMembers = filteredMembers.length;

return (
<ViewComponent
title="Members"
Expand Down Expand Up @@ -179,6 +183,17 @@ const RoomMembers = ({ members }) => {
</Box>
</Box>
</Box>
<Box
css={css`
margin-top: 1rem;
margin-bottom: 1rem;
`}
>
<Divider />
</Box>
<Box>
Showing {displayedMembers} of {totalMembers}
</Box>
<Box css={styles.memberList}>
{filteredMembers.length > 0 ? (
filteredMembers.map((member) => (
Expand Down

0 comments on commit b5b982c

Please sign in to comment.