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 7, 2024
1 parent 5b80a3a commit 6c2d467
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 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,14 @@ 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"
}
}
}

case NotificationType.BridgeMovement: {
Expand Down

0 comments on commit 6c2d467

Please sign in to comment.