import { Avatar, Tooltip } from "antd"; import { useRecoilValue } from "recoil"; import { checkIncomingMessageSelector, selectedPriorityConvoAtom, } from "../../recoil/main"; import Conversation from "../../../common/models/conversation"; import { MasterAvatarGroupWithUserFetch } from "../UserDetails/MasterAvatarGroup"; import moment from "moment"; import { FaMicrophoneAlt, FaPlay } from "react-icons/fa"; export default function PriorityConvoRow(props: { conversation: Conversation; itemIndex: number; }) { // figure out if this is a selectedConvo const selectedConvo = useRecoilValue(selectedPriorityConvoAtom); const isSelected = selectedConvo == props.conversation.id ? true : false; // who was the last sender based on the lastInteractionDate etc. const isNewIncoming = useRecoilValue( checkIncomingMessageSelector(props.conversation.id) ); // todo: implement method in conversation // const isOneonOne = return ( {props.conversation.name} {props.itemIndex} {moment(props.conversation.lastActivityDate.toDate()).fromNow()} {isSelected && ( <> )} ); }