From 5ced7f916d94e86e9a7ec164bee56f9a8e3a2a3a Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero <ariel@costas.dev>
Date: Mon, 26 May 2025 10:48:43 +0200
Subject: Replace Azure SWA with custom server

---
 src/components/RegularTable.tsx | 70 -----------------------------------------
 1 file changed, 70 deletions(-)
 delete mode 100644 src/components/RegularTable.tsx

(limited to 'src/components/RegularTable.tsx')

diff --git a/src/components/RegularTable.tsx b/src/components/RegularTable.tsx
deleted file mode 100644
index 8f0605f..0000000
--- a/src/components/RegularTable.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-import { StopDetails } from "../pages/Estimates";
-import LineIcon from "./LineIcon";
-
-interface RegularTableProps {
-    data: StopDetails;
-    dataDate: Date | null;
-}
-
-export const RegularTable: React.FC<RegularTableProps> = ({ data, dataDate }) => {
-
-    const absoluteArrivalTime = (minutes: number) => {
-        const now = new Date()
-        const arrival = new Date(now.getTime() + minutes * 60000)
-        return Intl.DateTimeFormat(navigator.language, {
-            hour: '2-digit',
-            minute: '2-digit'
-        }).format(arrival)
-    }
-
-    const formatDistance = (meters: number) => {
-        if (meters > 1024) {
-            return `${(meters / 1000).toFixed(1)} km`;
-        } else {
-            return `${meters} m`;
-        }
-    }
-
-    return <table className="table">
-        <caption>Estimaciones de llegadas a las {dataDate?.toLocaleTimeString()}</caption>
-
-        <thead>
-            <tr>
-                <th>Línea</th>
-                <th>Ruta</th>
-                <th>Llegada</th>
-                <th>Distancia</th>
-            </tr>
-        </thead>
-
-        <tbody>
-            {data.estimates
-                .sort((a, b) => a.minutes - b.minutes)
-                .map((estimate, idx) => (
-                    <tr key={idx}>
-                        <td><LineIcon line={estimate.line} /></td>
-                        <td>{estimate.route}</td>
-                        <td>
-                            {estimate.minutes > 15
-                                ? absoluteArrivalTime(estimate.minutes)
-                                : `${estimate.minutes} min`}
-                        </td>
-                        <td>
-                            {estimate.meters > -1
-                                ? formatDistance(estimate.meters)
-                                : "No disponible"
-                            }
-                        </td>
-                    </tr>
-                ))}
-        </tbody>
-
-        {data?.estimates.length === 0 && (
-            <tfoot>
-                <tr>
-                    <td colSpan={4}>No hay estimaciones disponibles</td>
-                </tr>
-            </tfoot>
-        )}
-    </table>
-}
\ No newline at end of file
-- 
cgit v1.3

