chore: build and UI fixes

This commit is contained in:
2026-02-26 20:58:10 -05:00
parent 34a73f0f94
commit 1f0229461b
10 changed files with 17 additions and 18 deletions

View File

@ -27,7 +27,7 @@ function getBusStatus(timeStr: string): 'departing' | 'ontime' | 'upcoming' {
const now = new Date()
const [h, m] = timeStr.split(':').map(Number)
const schedDate = new Date()
schedDate.setHours(h, m, 0, 0)
schedDate.setHours(h || 0, m || 0, 0, 0)
const diffMin = (schedDate.getTime() - now.getTime()) / 60000
if (diffMin >= 0 && diffMin <= 10) return 'departing'
if (diffMin > 10 && diffMin <= 60) return 'ontime'