mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-03 22:33:07 +00:00
Fix the key
The timestamp is seconds so you can easily have the same key if two participants send a message at the same time.
This commit is contained in:
parent
e0be69a056
commit
0969d073ac
@ -11,7 +11,8 @@ export default function ChatList(props: Props) {
|
||||
|
||||
const listItems = messages.map((currentMessage) => (
|
||||
<Message
|
||||
key={currentMessage.timestamp.toString()}
|
||||
// We assume that the same user is not sending two messages in the same second
|
||||
key={currentMessage.timestamp.toString() + currentMessage.nick}
|
||||
authorName={currentMessage.nick}
|
||||
date={formatDisplayDate(currentMessage)}
|
||||
>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user