key on map to avoid error on console

This commit is contained in:
anovazzi1 2023-04-26 00:14:18 -03:00
commit 7ae1351e41
2 changed files with 5 additions and 7 deletions

View file

@ -24,16 +24,14 @@ export default function ChatInput({
}}
ref={inputRef}
disabled={lockChat}
style={{minHeight: "40px", maxHeight: "100px", resize: "none" }}
style={{resize: "none" }}
value={lockChat ? "Thinking..." : chatValue}
onChange={(e) => {
inputRef.current.style.height = "auto";
inputRef.current.style.height = inputRef.current.scrollHeight + "px";
onChange={(e) => {
setChatValue(e.target.value);
}}
className={classNames(
lockChat ? "bg-gray-500 text-white" : "dark:bg-gray-700",
"form-input block w-full custom-scroll rounded-md border-gray-300 dark:border-gray-600 dark:text-white pr-10 sm:text-sm"
"form-input block w-full custom-scroll h-10 rounded-md border-gray-300 dark:border-gray-600 dark:text-white pr-10 sm:text-sm"
)}
placeholder={"Send a message..."}
/>

View file

@ -53,9 +53,9 @@ export default function ChatMessage({ chat }: { chat: ChatMessageType }) {
{chat.message}
{chat.files && (
<div className="my-2 w-full">
{chat.files.map((file) => {
{chat.files.map((file,index) => {
return (
<div className="my-2 w-full">
<div key={index} className="my-2 w-full">
<FileCard
fileName={"File"}
fileType={file.type}