import Conversation from "@nirvana/common/models/conversation"; import { agoraService, conversationService } from "@nirvana/common/services"; import { Avatar, Tooltip } from "antd"; import toast from "react-hot-toast"; import { FaPhoneSlash, FaWalking } from "react-icons/fa"; import { useAuth } from "../../contexts/authContext"; import { MasterAvatarGroupWithUserFetch } from "../UserDetails/MasterAvatarGroup"; export default function LiveRoom(props: { conversation: Conversation; handleJoinLive: (conversationId: string) => Promise; handleLeaveLive: (conversationId: string) => Promise; }) { const { currUser } = useAuth(); return ( {props.conversation.name} {"01:20"} {props.conversation.membersInLiveRoom.includes(currUser!.uid) ? ( props.handleLeaveLive(props.conversation.id)} className="p-2 rounded-full hover:cursor-pointer hover:bg-slate-200 absolute right-5 text-slate-50 group-hover:text-red-600 text-lg transition-all -z-10 group-hover:z-10" > ) : ( props.handleJoinLive(props.conversation.id)} className="p-2 rounded-full hover:cursor-pointer hover:bg-slate-200 absolute right-5 text-slate-50 group-hover:text-teal-600 text-lg transition-all -z-10 group-hover:z-10" > )} ); }