Improve layout of various message bubbles

This commit is contained in:
Scott Nonnenberg 2022-04-07 09:58:15 -07:00 committed by GitHub
parent 933c07c9ce
commit b50c96c0b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 166 additions and 25 deletions

View file

@ -11,7 +11,14 @@ export function getIncrement(length: number): number {
return Math.ceil(length / 12);
}
export function getTimerBucket(expiration: number, length: number): string {
export function getTimerBucket(
expiration: number | undefined,
length: number
): string {
if (!expiration) {
return '60';
}
const delta = expiration - Date.now();
if (delta < 0) {
return '00';