ui: highlight upcoming and current contest

This commit is contained in:
undefined committed 2021-10-10 19:08:52 +08:00
1 parent fb19c8073f
commit 81076b4899
7 files changed
+19 -8

No files matched your search

+1 -1
View File
@@ -527,7 +527,7 @@ export function isNew(tdoc: Tdoc, days = 1) {
return (now < readyAt - days * 24 * 3600 * 1000);
}
export function isUpcoming(tdoc: Tdoc, days = 1) {
export function isUpcoming(tdoc: Tdoc, days = 7) {
const now = new Date().getTime();
const readyAt = tdoc.beginAt.getTime();
return (now > readyAt - days * 24 * 3600 * 1000 && now < tdoc.beginAt.getTime());