Changing the icon to move just in the last message on chat

This commit is contained in:
Cristhian Zanforlin Lousa 2023-05-31 21:22:42 -03:00
commit 6332c4c084
2 changed files with 7 additions and 3 deletions

View file

@ -16,13 +16,12 @@ import Convert from "ansi-to-html";
export default function ChatMessage({
chat,
lockChat,
lastMessage
lastMessage,
}: {
chat: ChatMessageType;
lockChat: boolean;
lastMessage: boolean;
}) {
const convert = new Convert({ newline: true });
const [message, setMessage] = useState("");
const imgRef = useRef(null);

View file

@ -416,7 +416,12 @@ export default function ChatModal({
>
{chatHistory.length > 0 ? (
chatHistory.map((c, i) => (
<ChatMessage lockChat={lockChat} chat={c} lastMessage={chatHistory.length-1 == i ? true : false} key={i} />
<ChatMessage
lockChat={lockChat}
chat={c}
lastMessage={chatHistory.length - 1 == i ? true : false}
key={i}
/>
))
) : (
<div className="flex flex-col h-full text-center justify-center w-full items-center align-middle">