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