diff --git a/packages/web/components/Conversations/ConversationFullRow.tsx b/packages/web/components/Conversations/ConversationFullRow.tsx index 1125649..4a035d5 100644 --- a/packages/web/components/Conversations/ConversationFullRow.tsx +++ b/packages/web/components/Conversations/ConversationFullRow.tsx @@ -28,8 +28,8 @@ import { Routes } from "@nirvana/common/helpers/routes"; export default function ConversationFullRow(props: { conversation: Conversation; - handleJoinLive: (conversationId: string) => Promise; - handleLeaveLive: (conversationId: string) => Promise; + handleJoinLive?: (conversationId: string) => Promise; + handleLeaveLive?: (conversationId: string) => Promise; }) { const { currUser } = useAuth(); const usersConvosMap = useRecoilValue(allUsersConversationsAtom); @@ -128,17 +128,21 @@ export default function ConversationFullRow(props: { className="ml-2 flex flex-row items-center group-hover:visible invisible text-slate-400" > - - { - e.stopPropagation(); - props.handleJoinLive(props.conversation.id); - }} - className="p-2 rounded-full hover:cursor-pointer hover:bg-slate-200" - > - - - + {props.handleJoinLive && ( + + { + e.stopPropagation(); + if (props.handleJoinLive) { + props.handleJoinLive(props.conversation.id); + } + }} + className="p-2 rounded-full hover:cursor-pointer hover:bg-slate-200" + > + + + + )} -
- -
- - -
- {page} -
-
- - ); -}