/* Copyright 2022-2024 New Vector Ltd. SPDX-License-Identifier: AGPL-3.0-only Please see LICENSE in the repository root for full details. */ import { Link } from "react-router-dom"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { Room } from "matrix-js-sdk/src/models/room"; import { FC } from "react"; import { Avatar, Size } from "../Avatar"; import styles from "./CallList.module.css"; import { getRelativeRoomUrl } from "../utils/matrix"; import { Body } from "../typography/Typography"; import { GroupCallRoom } from "./useGroupCallRooms"; import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement"; interface CallListProps { rooms: GroupCallRoom[]; client: MatrixClient; } export const CallList: FC = ({ rooms, client }) => { return ( <>
{rooms.map(({ room, roomName, avatarUrl, participants }) => ( ))} {rooms.length > 3 && ( <>
)}
); }; interface CallTileProps { name: string; avatarUrl: string; room: Room; participants: RoomMember[]; client: MatrixClient; } const CallTile: FC = ({ name, avatarUrl, room }) => { const roomEncryptionSystem = useRoomEncryptionSystem(room.roomId); return (
{name}
); };