Use timestamp in millisecond

It was implicitly using `toString` which return the timestamp in
readable format with a precision in seconds which meant messages sent
within the same second had the same key.
This commit is contained in:
Franck Royer 2022-05-19 15:30:54 +10:00
parent 35cfd5679e
commit 27a90d8204
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ function App() {
<ul>
{messages.map((msg) => {
return (
<li key={msg.timestamp}>
<li key={msg.timestamp.valueOf()}>
<p>
{msg.timestamp.toString()}: {msg.text}
</p>