From ebfb7c1c8bc0a9ec50bde72eb9a0859c6e5dcee5 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Wed, 6 Aug 2025 21:52:21 +0200 Subject: Fix this fucking pile of steaming garbage --- src/frontend/app/routes/estimates-$id.tsx | 59 +++++++++++-------------------- 1 file changed, 20 insertions(+), 39 deletions(-) (limited to 'src/frontend/app/routes/estimates-$id.tsx') diff --git a/src/frontend/app/routes/estimates-$id.tsx b/src/frontend/app/routes/estimates-$id.tsx index d9b9b47..1582275 100644 --- a/src/frontend/app/routes/estimates-$id.tsx +++ b/src/frontend/app/routes/estimates-$id.tsx @@ -8,8 +8,6 @@ import { useApp } from "../AppContext"; import { GroupedTable } from "../components/GroupedTable"; import { useTranslation } from "react-i18next"; import { TimetableTable, type TimetableEntry } from "../components/TimetableTable"; -import { usePullToRefresh } from "../hooks/usePullToRefresh"; -import { PullToRefreshIndicator } from "../components/PullToRefresh"; import { useAutoRefresh } from "../hooks/useAutoRefresh"; export interface StopDetails { @@ -84,17 +82,6 @@ export default function Estimates() { ]); }, [loadEstimatesData, loadTimetableDataAsync]); - const { - containerRef, - isRefreshing, - pullDistance, - canRefresh, - } = usePullToRefresh({ - onRefresh: refreshData, - threshold: 80, - enabled: true, - }); - // Auto-refresh estimates data every 30 seconds useAutoRefresh({ onRefresh: loadEstimatesData, @@ -139,23 +126,18 @@ export default function Estimates() { return

{t("common.loading")}

; return ( -
- -
-

- - - {customName ?? data.stop.name}{" "} - ({data.stop.id}) -

-
+
+
+

+ + + {customName ?? data.stop.name}{" "} + ({data.stop.id}) +

+
{tableStyle === "grouped" ? ( @@ -175,15 +157,14 @@ export default function Estimates() {
- - {t("timetable.viewAll", "Ver todos los horarios")} - -
- )} -
- + className="view-all-link" + > + + {t("timetable.viewAll", "Ver todos los horarios")} + +
+ )} +
); } -- cgit v1.3