Fix 'install now' click after download

This commit is contained in:
Josh Perez 2021-08-23 18:45:11 -04:00 committed by GitHub
parent 81c57107ce
commit d80e738fb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 82 additions and 83 deletions

View file

@ -8,3 +8,11 @@ export function isMoreRecentThan(timestamp: number, delta: number): boolean {
export function isOlderThan(timestamp: number, delta: number): boolean {
return timestamp <= Date.now() - delta;
}
export function isInPast(timestamp: number): boolean {
return isOlderThan(timestamp, 0);
}
export function isInFuture(timestamp: number): boolean {
return isMoreRecentThan(timestamp, 0);
}