From a24639e17b63c5ebb9b2bb26af18e17302e9360b Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 6 Nov 2025 20:34:36 +0100 Subject: Add manual stop creation and override alerts with alternate stop codes (#74) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: arielcostas <94913521+arielcostas@users.noreply.github.com> Co-authored-by: Ariel Costas Guerrero --- src/frontend/app/components/StopAlert.tsx | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/frontend/app/components/StopAlert.tsx (limited to 'src/frontend/app/components/StopAlert.tsx') diff --git a/src/frontend/app/components/StopAlert.tsx b/src/frontend/app/components/StopAlert.tsx new file mode 100644 index 0000000..69ecc22 --- /dev/null +++ b/src/frontend/app/components/StopAlert.tsx @@ -0,0 +1,36 @@ +import React from "react"; +import { AlertCircle, Info } from "lucide-react"; +import type { Stop } from "~/data/StopDataProvider"; +import "./StopAlert.css"; + +interface StopAlertProps { + stop: Stop; + compact?: boolean; +} + +export const StopAlert: React.FC = ({ stop, compact = false }) => { + // Don't render anything if there's no alert content + const hasContent = stop.title || stop.message; + if (!hasContent) { + return null; + } + + const isError = stop.cancelled === true; + + return ( +
+
+ {isError ? : } +
+
+ {stop.title &&
{stop.title}
} + {stop.message &&
{stop.message}
} + {stop.alternateCodes && stop.alternateCodes.length > 0 && ( +
+ Alternative stops: {stop.alternateCodes.join(", ")} +
+ )} +
+
+ ); +}; -- cgit v1.3