import React, { useMemo } from "react"; import { AlertCircle, AlertOctagon, Info, TriangleAlert } 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 alertType = useMemo(() => { if (stop.alert === "error") return "stop-alert-error"; if (stop.alert === "warning") return "stop-alert-warning"; return "stop-alert-info"; }, [stop.alert]); const alertIcon = useMemo(() => { if (stop.alert === "error") return ; if (stop.alert === "warning") return ; return ; }, [stop.alert]); return ( <<<<<<< HEAD
{alertIcon}
{stop.title &&
{stop.title}
} {stop.message &&
{stop.message}
} =======
{isError ? : }
{stop.title &&
{stop.title}
} {stop.message && (
{stop.message}
)} {stop.alternateCodes && stop.alternateCodes.length > 0 && (
Alternative stops: {stop.alternateCodes.join(", ")}
)} >>>>>>> 88e0621 (Improve gallery scroll indicators and format code)
); };