fix: unique key in message list

This commit is contained in:
fryorcraken.eth 2022-09-02 14:14:28 +10:00
parent 491062154b
commit e4c001d901
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 4 additions and 6 deletions

View File

@ -16,12 +16,10 @@ export default function ChatList(props: Props) {
const renderedMessages = props.messages.map((message) => ( const renderedMessages = props.messages.map((message) => (
<LiveMessage <LiveMessage
key={ key={
message.sentTimestamp message.nick +
? message.sentTimestamp.valueOf() message.payloadAsUtf8 +
: "" + message.timestamp.valueOf() +
message.timestamp.valueOf() + message.sentTimestamp?.valueOf()
message.nick +
message.payloadAsUtf8
} }
authorName={message.nick} authorName={message.nick}
date={formatDisplayDate(message)} date={formatDisplayDate(message)}