aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Chat.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-11-19 22:53:33 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:59 +0300
commitda8f9c3c731d7511b59b994e47762d6f0770b554 (patch)
tree695b3202e8cbbac1d88cac7ca9cce9f4e0b5ab26 /vnext/src/ui/Chat.js
parenta8c7596c03ab69f5752c2d94a14160c5bc922309 (diff)
Moment -> Day.js
Diffstat (limited to 'vnext/src/ui/Chat.js')
-rw-r--r--vnext/src/ui/Chat.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/vnext/src/ui/Chat.js b/vnext/src/ui/Chat.js
index 2a3e90de..c1151daf 100644
--- a/vnext/src/ui/Chat.js
+++ b/vnext/src/ui/Chat.js
@@ -1,6 +1,8 @@
import { useEffect, useState, useCallback } from 'react';
import { useParams } from 'react-router-dom';
-import moment from 'moment';
+import dayjs from 'dayjs';
+import utc from 'dayjs/plugin/utc';
+dayjs.extend(utc);
import PM from './PM';
import MessageInput from './MessageInput';
@@ -77,7 +79,7 @@ export default function Chat(props) {
<ul className="Chat_messages">
{
chats.map((chat) =>
- <PM key={moment.utc(chat.timestamp).valueOf()} chat={chat} {...props} />
+ <PM key={dayjs.utc(chat.timestamp).valueOf()} chat={chat} {...props} />
)
}
</ul>