import { ConferenceData } from '../../background/jitsi/eventListeners' import { UsersData } from '../../background/types/roomData' import useMeetingStarted from '../../hooks/useMeetingStarted' import { useRoomName } from '../../hooks/useRoomName' import JitsiEntrypoint from '../jitsi/JitsiEntrypoint' import { UserInfo } from '../jitsi/types' import MeetingNameInput from './MeetingNameInput' import './Meeting.css' interface Props { conferenceData: ConferenceData | undefined setConferenceData: (newData: ConferenceData) => void userInfo: UserInfo usersData: UsersData } function Meeting(props: Props) { const { conferenceData, setConferenceData, userInfo, usersData } = props console.log("[Rooms] meeting usersData", props) const [meetingStarted] = useMeetingStarted() const { roomName } = useRoomName() const [_, setMeetingStarted] = useMeetingStarted() const { updateAndSubmitRoomName: updateAndSubmitRoomName } = useRoomName() if (meetingStarted) { return ( ) } return (
{usersData?.roomsData.map((roomData) => { return ( <>

{ updateAndSubmitRoomName(roomData.roomName) setMeetingStarted(true) }} > {roomData.roomName}

{roomData.participants.map((participant) => (
{participant.displayName}
))} ) })}
) } export default Meeting