aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Feeds.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Feeds.js')
-rw-r--r--vnext/src/ui/Feeds.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/vnext/src/ui/Feeds.js b/vnext/src/ui/Feeds.js
index fc402583..2019dffd 100644
--- a/vnext/src/ui/Feeds.js
+++ b/vnext/src/ui/Feeds.js
@@ -2,7 +2,9 @@ import { useState, useEffect } from 'react';
import { Link, useLocation, useParams, Navigate } from 'react-router-dom';
import qs from 'qs';
-import moment from 'moment';
+import dayjs from 'dayjs';
+import utc from 'dayjs/plugin/utc';
+dayjs.extend(utc);
import Message from './Message';
import Spinner from './Spinner';
@@ -171,7 +173,7 @@ function Feed({ query }) {
setLoading(true);
const filter = location.search.substring(1);
let getPageParam = (pageParam, lastMessage, filterParams) => {
- const pageValue = pageParam === 'before_mid' ? lastMessage.mid : pageParam === 'page' ? (Number(filterParams.page) || 0) + 1 : moment.utc(lastMessage.updated).valueOf();
+ const pageValue = pageParam === 'before_mid' ? lastMessage.mid : pageParam === 'page' ? (Number(filterParams.page) || 0) + 1 : dayjs.utc(lastMessage.updated).valueOf();
let newFilter = { ...filterParams };
newFilter[pageParam] = pageValue;
return `?${qs.stringify(newFilter)}`;