From 52256fd634300b39b915bf1db6020d9d2871a0b4 Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero <ariel@costas.dev>
Date: Fri, 7 Nov 2025 14:58:32 +0100
Subject: Implement experimental consolidated circulation view

---
 src/frontend/app/routes/estimates-$id.tsx | 13 +++++++------
 1 file changed, 7 insertions(+), 6 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 4502d9e..81c83ea 100644
--- a/src/frontend/app/routes/estimates-$id.tsx
+++ b/src/frontend/app/routes/estimates-$id.tsx
@@ -1,5 +1,5 @@
 import { type JSX, useEffect, useState, useCallback } from "react";
-import { useParams, Link } from "react-router";
+import { useParams, Link, Navigate } from "react-router";
 import StopDataProvider, { type Stop } from "../data/StopDataProvider";
 import { Star, Edit2, ExternalLink, RefreshCw } from "lucide-react";
 import "./estimates-$id.css";
@@ -105,6 +105,11 @@ export default function Estimates() {
   const { tableStyle, region } = useApp();
   const regionConfig = getRegionConfig(region);
 
+  // Redirect to /stops/$id if table style is experimental_consolidated
+  if (tableStyle === "experimental_consolidated") {
+    return <Navigate to={`/stops/${params.id}`} replace />;
+  }
+
   const parseError = (error: any): ErrorInfo => {
     if (!navigator.onLine) {
       return { type: "network", message: "No internet connection" };
@@ -171,10 +176,6 @@ export default function Estimates() {
     }
   }, [params.id, region, regionConfig.timetableEndpoint]);
 
-  const refreshData = useCallback(async () => {
-    await Promise.all([loadEstimatesData(), loadTimetableDataAsync()]);
-  }, [loadEstimatesData, loadTimetableDataAsync]);
-
   // Manual refresh function for pull-to-refresh and button
   const handleManualRefresh = useCallback(async () => {
     try {
@@ -299,7 +300,7 @@ export default function Estimates() {
 
         {stopData && stopData.lines && stopData.lines.length > 0 && (
           <div
-            className={`estimates-lines-container ${stopData.lines.length >= 6 ? "scrollable" : ""}`}
+            className={`estimates-lines-container`}
           >
             {stopData.lines.map((line) => (
               <div key={line} className="estimates-line-icon">
-- 
cgit v1.3

