Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 2x | import React from "react";
import { StopAlertsCard, type StopAlertsCardProps } from "@overworld/ui/alerts";
import { getAlertsForStop } from "../../../api/trimet/alertScopes";
import RouteIndicator from "../../../component/route/RouteIndicator";
import Loading from "../../loading/Loading";
type Props = Omit<StopAlertsCardProps, "loadingContent" | "renderRouteIndicator"> & { stopId: number };
export function AlertsCard({ alertsData, stopId, ...props }: Props) {
return <StopAlertsCard {...props}
alertsData={alertsData === undefined ? undefined : getAlertsForStop(alertsData, stopId)}
loadingContent={<Loading />}
renderRouteIndicator={id => <RouteIndicator routeId={id} />}
/>;
}
|