Skip to content

Commit

Permalink
feat: add deactivated detour notification card
Browse files Browse the repository at this point in the history
  • Loading branch information
firestack committed Oct 8, 2024
1 parent ea6339c commit 57f9cc2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion assets/src/components/notificationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
BlockWaiverReason,
NotificationType,
isBlockWaiverNotification,
DetourNotificationStatus,
} from "../realtime"
import { Route } from "../schedule"
import { formattedTime } from "../util/dateTime"
Expand Down Expand Up @@ -99,7 +100,17 @@ export const title = (notification: Notification) => {
}

case NotificationType.Detour: {
return "Detour - Active"
switch (notification.content.status) {
case DetourNotificationStatus.Activated: {
return "Detour - Active"
}
case DetourNotificationStatus.Deactivated: {
return "Detour - Closed"
}
}
// Typescript says this is unreachable,
// but eslint doesn't seem to get the memo
break
}

case NotificationType.BridgeMovement: {
Expand Down

0 comments on commit 57f9cc2

Please sign in to comment.