chore: build and UI fixes
This commit is contained in:
@ -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'
|
||||
|
||||
Reference in New Issue
Block a user