aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/app/components')
-rw-r--r--src/frontend/app/components/arrivals/ArrivalCard.css (renamed from src/frontend/app/components/Stops/ArrivalCard.css)0
-rw-r--r--src/frontend/app/components/arrivals/ArrivalCard.tsx (renamed from src/frontend/app/components/Stops/ArrivalCard.tsx)10
-rw-r--r--src/frontend/app/components/arrivals/ArrivalList.tsx (renamed from src/frontend/app/components/Stops/ArrivalList.tsx)0
-rw-r--r--src/frontend/app/components/map/StopSummarySheet.tsx2
4 files changed, 7 insertions, 5 deletions
diff --git a/src/frontend/app/components/Stops/ArrivalCard.css b/src/frontend/app/components/arrivals/ArrivalCard.css
index 5835352..5835352 100644
--- a/src/frontend/app/components/Stops/ArrivalCard.css
+++ b/src/frontend/app/components/arrivals/ArrivalCard.css
diff --git a/src/frontend/app/components/Stops/ArrivalCard.tsx b/src/frontend/app/components/arrivals/ArrivalCard.tsx
index 96d0af0..de4fcc7 100644
--- a/src/frontend/app/components/Stops/ArrivalCard.tsx
+++ b/src/frontend/app/components/arrivals/ArrivalCard.tsx
@@ -16,11 +16,11 @@ export const ArrivalCard: React.FC<ArrivalCardProps> = ({
const { t } = useTranslation();
const { route, headsign, estimate } = arrival;
- const etaValue = Math.max(0, Math.round(estimate.minutes)).toString();
+ const etaValue = estimate.minutes.toString();
const etaUnit = t("estimates.minutes", "min");
const timeClass = useMemo(() => {
- switch (estimate.precission) {
+ switch (estimate.precision) {
case "confident":
return "time-running";
case "unsure":
@@ -30,7 +30,7 @@ export const ArrivalCard: React.FC<ArrivalCardProps> = ({
default:
return "time-scheduled";
}
- }, [estimate.precission]);
+ }, [estimate.precision]);
return (
<div
@@ -50,7 +50,9 @@ export const ArrivalCard: React.FC<ArrivalCardProps> = ({
/>
</div>
<div className="flex-1 min-w-0 flex flex-col gap-1">
- <strong className="text-base text-(--text-color) overflow-hidden text-ellipsis line-clamp-2 leading-tight">
+ <strong
+ className={`text-base overflow-hidden text-ellipsis line-clamp-2 leading-tight ${estimate.precision == "past" ? "line-through" : ""}`}
+ >
{headsign.destination}
</strong>
</div>
diff --git a/src/frontend/app/components/Stops/ArrivalList.tsx b/src/frontend/app/components/arrivals/ArrivalList.tsx
index a1210d5..a1210d5 100644
--- a/src/frontend/app/components/Stops/ArrivalList.tsx
+++ b/src/frontend/app/components/arrivals/ArrivalList.tsx
diff --git a/src/frontend/app/components/map/StopSummarySheet.tsx b/src/frontend/app/components/map/StopSummarySheet.tsx
index 16a9cbe..e318bee 100644
--- a/src/frontend/app/components/map/StopSummarySheet.tsx
+++ b/src/frontend/app/components/map/StopSummarySheet.tsx
@@ -3,7 +3,7 @@ import React from "react";
import { useTranslation } from "react-i18next";
import { Sheet } from "react-modal-sheet";
import { Link } from "react-router";
-import { ArrivalList } from "~/components/Stops/ArrivalList";
+import { ArrivalList } from "~/components/arrivals/ArrivalList";
import { useStopArrivals } from "../../hooks/useArrivals";
import { ErrorDisplay } from "../ErrorDisplay";
import LineIcon from "../LineIcon";