Compare commits
2 commits
828cba41bd
...
2f255c96c1
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f255c96c1 | |||
| 62833f1b6e |
2 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: 'Mapping Challenge #1'
|
||||
description: 'Наш первый конкурс для авторов карт под Half-Life Deathmatch!'
|
||||
date: '2025-11-26 10:00:00 GMT+3'
|
||||
|
||||
type: 'event'
|
||||
dateEventFrom: '2025-11-26 12:00:00 GMT+3'
|
||||
|
|
|
|||
|
|
@ -36,7 +36,11 @@
|
|||
eventStatus === EventStatus.NotStarted
|
||||
? data.blogPost.dateEventFrom!
|
||||
: data.blogPost.dateEventTo!;
|
||||
const delay = new Date(endpointString).valueOf() - new Date().valueOf();
|
||||
const delay = Math.min(
|
||||
new Date(endpointString).valueOf() - new Date().valueOf(),
|
||||
// Из-за ограничения функции setTimeout, будем проверять максимум каждые 12 часов
|
||||
12 * 60 * 60 * 1000
|
||||
);
|
||||
if (delay <= 0) return;
|
||||
// Плюс пол секунды, чтобы анимация часов успела проиграть
|
||||
eventTimeout = setTimeout(updateStatus, delay + 500);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue