fixed react key

This commit is contained in:
markshawn2020 2023-07-14 21:15:34 +08:00
parent 91cb7aa13d
commit 3f8b14f5f8

View File

@ -5,6 +5,7 @@ import React, {
useEffect,
useMemo,
useCallback,
Fragment,
} from "react";
import SendWhiteIcon from "../icons/send-white.svg";
@ -975,9 +976,8 @@ export function Chat() {
const shouldShowClearContextDivider = i === clearContextIndex - 1;
return (
<>
<Fragment key={i}>
<div
key={i}
className={
isUser ? styles["chat-message-user"] : styles["chat-message"]
}
@ -1082,7 +1082,7 @@ export function Chat() {
</div>
</div>
{shouldShowClearContextDivider && <ClearContextDivider />}
</>
</Fragment>
);
})}
</div>