From 80f6263516e307bcc6d887f6f91757bc73ae63f2 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 17:34:28 +0100 Subject: Add loading states, error handling, and refresh feedback to stops-$id page (#89) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: arielcostas <94913521+arielcostas@users.noreply.github.com> --- src/frontend/app/routes/stops-$id.tsx | 36 ++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'src/frontend/app/routes/stops-$id.tsx') diff --git a/src/frontend/app/routes/stops-$id.tsx b/src/frontend/app/routes/stops-$id.tsx index 7d533a5..86e74d9 100644 --- a/src/frontend/app/routes/stops-$id.tsx +++ b/src/frontend/app/routes/stops-$id.tsx @@ -11,6 +11,8 @@ import { type RegionId, getRegionConfig } from "~/data/RegionConfig"; import { StopAlert } from "~/components/StopAlert"; import LineIcon from "~/components/LineIcon"; import { ConsolidatedCirculationList } from "~/components/Stops/ConsolidatedCirculationList"; +import { ConsolidatedCirculationListSkeleton } from "~/components/Stops/ConsolidatedCirculationListSkeleton"; +import { ErrorDisplay } from "~/components/ErrorDisplay"; export interface ConsolidatedCirculation { line: string; @@ -197,7 +199,7 @@ export default function Estimates() {
- {/* TODO: Implement skeleton */} +
@@ -255,17 +257,33 @@ export default function Estimates() {

+ {(isManualRefreshing || dataLoading) && ( +
+ + {t("estimates.refreshing", "Actualizando datos...")} +
+ )} + {stopData && }
- {data ? ( - <> - - + {dataLoading ? ( + + ) : dataError ? ( + + ) : data ? ( + ) : null}
-- cgit v1.3