joining and leaving backend side done and now agora test here we go

This commit is contained in:
Arjun Patel
2022-02-07 21:57:17 -08:00
parent 8d382f960a
commit 1bc7957824
8 changed files with 235 additions and 26 deletions
@@ -28,6 +28,8 @@ import { Routes } from "@nirvana/common/helpers/routes";
export default function ConversationFullRow(props: {
conversation: Conversation;
handleJoinLive: (conversationId: string) => Promise<void>;
handleLeaveLive: (conversationId: string) => Promise<void>;
}) {
const { currUser } = useAuth();
const usersConvosMap = useRecoilValue(allUsersConversationsAtom);
@@ -75,10 +77,6 @@ export default function ConversationFullRow(props: {
audio.play();
};
const joinLive = () => {
toast("connecting");
};
/**
* show actions based on which state it is currently in for this user
*/
@@ -134,7 +132,7 @@ export default function ConversationFullRow(props: {
<span
onClick={(e) => {
e.stopPropagation();
joinLive();
props.handleJoinLive(props.conversation.id);
}}
className="p-2 rounded-full hover:cursor-pointer hover:bg-slate-200"
>
@@ -164,7 +162,7 @@ export default function ConversationFullRow(props: {
isNewIncoming ? "text-slate-400 font-semibold" : "text-slate-300"
}`}
>
{moment(props.conversation.lastActivityDate.toDate()).fromNow()}
{moment(props.conversation.lastActivityDate?.toDate()).fromNow()}
</span>
{/* actions */}