adding some things for tldr/subject line on creation of a chat

This commit is contained in:
Arjun Patel
2022-02-06 14:15:18 -08:00
parent 816d62f75c
commit 8a56a69a52
2 changed files with 22 additions and 2 deletions
+3 -1
View File
@@ -22,11 +22,13 @@ export default class Conversation {
constructor(
_createdByUserId: string,
_name: string,
_initialUsers: string[] = [] as string[]
_initialUsers: string[] = [] as string[],
_tldr?: string
) {
this.name = _name;
this.createdByUserId = _createdByUserId;
this.activeMembers = _initialUsers;
this.tldr = _tldr;
}
}
@@ -30,6 +30,7 @@ export default function CreateConversation() {
const [isLoading, setIsLoading] = useState<boolean>(false);
const [userSearchInput, setUserSearchInput] = useState<string>("");
const [conversationName, setConversationName] = useState<string>("");
const [tldr, setTldr] = useState<string>("");
// recommendations list: algolio results + cached "relevant users" from all cached conversations currently
// options for the select
@@ -290,7 +291,7 @@ export default function CreateConversation() {
Name<span className="text-orange-500">*</span>
</span>
<span className="text-slate-300 text-xs">
It can be casual or like an email subject line.
Think of a group or conversation name.
</span>
<input
@@ -301,6 +302,23 @@ export default function CreateConversation() {
/>
</span>
<span className="flex flex-col mt-10">
<span className="uppercase tracking-widest text-slate-400 font-semibold">
tldr<span className="text-orange-500"></span>
</span>
<span className="text-slate-300 text-xs">
It can be casual or like an email subject line. Do this later if
you want.
</span>
<input
className="p-3 rounded mt-2 bg-slate-50 border placeholder-slate-300"
placeholder="ex: code 'n chill, sales, birthdays, sprint 7..."
value={tldr}
onChange={(e) => setTldr(e.target.value)}
/>
</span>
{!isSubmitting && (
<button
onClick={createConversation}