(ms: number)
| 57 | } |
| 58 | |
| 59 | const formatSessionRemaining = (ms: number): string => { |
| 60 | if (ms <= 0) return 'expiring…' |
| 61 | if (ms < COUNTDOWN_VISIBLE_MS) return `${formatCountdown(ms)} left` |
| 62 | const totalMinutes = Math.ceil(ms / 60_000) |
| 63 | if (totalMinutes < 60) return `${totalMinutes}m left` |
| 64 | const hours = Math.floor(totalMinutes / 60) |
| 65 | const minutes = totalMinutes % 60 |
| 66 | return minutes === 0 ? `${hours}h left` : `${hours}h ${minutes}m left` |
| 67 | } |
| 68 | |
| 69 | interface StatusBarProps { |
| 70 | timerStartTime: number | null |
no test coverage detected