From 5ced7f916d94e86e9a7ec164bee56f9a8e3a2a3a Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero 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 = ({ 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 - - - - - - - - - - - - - {data.estimates - .sort((a, b) => a.minutes - b.minutes) - .map((estimate, idx) => ( - - - - - - - ))} - - - {data?.estimates.length === 0 && ( - - - - - - )} -
Estimaciones de llegadas a las {dataDate?.toLocaleTimeString()}
LĂ­neaRutaLlegadaDistancia
{estimate.route} - {estimate.minutes > 15 - ? absoluteArrivalTime(estimate.minutes) - : `${estimate.minutes} min`} - - {estimate.meters > -1 - ? formatDistance(estimate.meters) - : "No disponible" - } -
No hay estimaciones disponibles
-} \ No newline at end of file -- cgit v1.3