import { User, UserStatus } from "@nirvana/common/models/user"; import { Select, Tag } from "antd"; import { useEffect, useRef, useState } from "react"; import SimpleUserDetailsRow from "../UserDetails/SimpleUserDetailsRow"; export default function CreateConversation() { const input = useRef(); const [selectedUsers, setSelectedUsers] = useState([] as User[]); // recommendations list: algolio results + cached "relevant users" from all cached conversations currently // options for the select // have a list of 10 max? const [recommendedUsers, setRecommendedUsers] = useState( [] as User[] ); const options = recommendedUsers.map((recUser) => { value: recUser.firstName + " " + recUser.lastName; }); useEffect(() => { input.current?.focus(); }, []); // as people are selected, add a list of users // if it's an email of a non-nirvana user, then hit invite button to email them with a voice clip along with it // if it's an existing user, then show a nice chip of that user's profile picture and their name return (
{/* if it's a one on one, and i already have a conversation with them, then block creating a new one? */}
); } function tagRender(props) { const { label, value, closable, onClose } = props; const onPreventMouseDown = (event) => { event.preventDefault(); event.stopPropagation(); }; return ( {label} ); }