1export const SECOND = 1000;
2export const MINUTE = SECOND * 60;
3export const HOUR = MINUTE * 60;
5export const padZero = (amount: number) =>
6 `${amount < 10 && amount > 0 ? '0' : ''}${amount}`;
8export const getTimeToNextBatch = (nextBatch: number, now: number) => {
9 const toNext = nextBatch - now;
10 const hours = Math.floor(toNext / HOUR);
11 const minutes = Math.floor((toNext - hours * HOUR) / MINUTE);
12 const seconds = Math.floor(
13 (toNext - hours * HOUR - minutes * MINUTE) / SECOND
16 return `${padZero(hours)}h ${padZero(minutes)}m ${padZero(seconds)}s`;
19export const isL2 = (dom?: string) => dom === 'l2' || dom === 'spawn';
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list