aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/Stops
diff options
context:
space:
mode:
authorCopilot <198982749+Copilot@users.noreply.github.com>2025-11-07 19:44:50 +0100
committerGitHub <noreply@github.com>2025-11-07 19:44:50 +0100
commita6ec0e52ecb33915cc4c4b22df1d2512ab9b0111 (patch)
tree68dfd09c9067bb95dc4f7f5c20004dda20bef9ed /src/frontend/app/components/Stops
parent6941f4fb37ffa57c2e4631ff6641976d21151e54 (diff)
PWA: use standalone display mode and disable scroll on modal sheets (#82)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: arielcostas <94913521+arielcostas@users.noreply.github.com>
Diffstat (limited to 'src/frontend/app/components/Stops')
-rw-r--r--src/frontend/app/components/Stops/ConsolidatedCirculationList.tsx27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/frontend/app/components/Stops/ConsolidatedCirculationList.tsx b/src/frontend/app/components/Stops/ConsolidatedCirculationList.tsx
index a1b50f2..1ba460b 100644
--- a/src/frontend/app/components/Stops/ConsolidatedCirculationList.tsx
+++ b/src/frontend/app/components/Stops/ConsolidatedCirculationList.tsx
@@ -4,7 +4,7 @@ import { type ConsolidatedCirculation } from "~routes/stops-$id";
import LineIcon from "~components/LineIcon";
import { type RegionConfig } from "~data/RegionConfig";
-import './ConsolidatedCirculationList.css';
+import "./ConsolidatedCirculationList.css";
interface RegularTableProps {
data: ConsolidatedCirculation[];
@@ -106,9 +106,13 @@ export const ConsolidatedCirculationList: React.FC<RegularTableProps> = ({
if (delay >= -1 && delay <= 2) {
return t("estimates.on_time", "on time");
} else if (delay > 2) {
- return t("estimates.minutes_late", "{{minutes}} minutes late", { minutes: delay });
+ return t("estimates.minutes_late", "{{minutes}} minutes late", {
+ minutes: delay,
+ });
} else {
- return t("estimates.minutes_early", "{{minutes}} minutes early", { minutes: Math.abs(delay) });
+ return t("estimates.minutes_early", "{{minutes}} minutes early", {
+ minutes: Math.abs(delay),
+ });
}
};
@@ -124,9 +128,7 @@ export const ConsolidatedCirculationList: React.FC<RegularTableProps> = ({
if (estimate.realTime && !estimate.schedule) {
return "time-running";
- }
-
- else if (estimate.realTime && !estimate.schedule?.running) {
+ } else if (estimate.realTime && !estimate.schedule?.running) {
return "time-delayed";
}
@@ -134,8 +136,9 @@ export const ConsolidatedCirculationList: React.FC<RegularTableProps> = ({
};
const sortedData = [...data].sort(
- (a, b) => (a.realTime?.minutes ?? a.schedule?.minutes ?? 999) -
- (b.realTime?.minutes ?? b.schedule?.minutes ?? 999)
+ (a, b) =>
+ (a.realTime?.minutes ?? a.schedule?.minutes ?? 999) -
+ (b.realTime?.minutes ?? b.schedule?.minutes ?? 999),
);
return (
@@ -153,7 +156,8 @@ export const ConsolidatedCirculationList: React.FC<RegularTableProps> = ({
) : (
<div className="consolidated-circulation-list">
{sortedData.map((estimate, idx) => {
- const displayMinutes = estimate.realTime?.minutes ?? estimate.schedule?.minutes ?? 0;
+ const displayMinutes =
+ estimate.realTime?.minutes ?? estimate.schedule?.minutes ?? 0;
const timeClass = getTimeClass(estimate);
const delayText = getDelayText(estimate);
@@ -202,7 +206,10 @@ export const ConsolidatedCirculationList: React.FC<RegularTableProps> = ({
</>
) : (
<>
- {t("estimates.unknown_service", "Unknown service. It may be a reinforcement or the service has a different name than planned.")}
+ {t(
+ "estimates.unknown_service",
+ "Unknown service. It may be a reinforcement or the service has a different name than planned.",
+ )}
</>
)}
</span>