joining and leaving backend side done and now agora test here we go
This commit is contained in:
@@ -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 */}
|
||||
|
||||
Reference in New Issue
Block a user