From e58ad34e43406ec1b5de112110b8eaa471dae42c Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Mon, 11 Nov 2024 22:05:00 +0100 Subject: [PATCH] Update logo for CTS --- src/TrainsTable.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/TrainsTable.js b/src/TrainsTable.js index 1e103f1..463e02e 100644 --- a/src/TrainsTable.js +++ b/src/TrainsTable.js @@ -202,9 +202,13 @@ function getTrainType(train) { default: return trainType } - case "FR-IDF-IDFM": + case "FR-IDFM": + const route_split = train.routeShortName.split(" ") + if (route_split[0] === "Bus") + return route_split[1] + return route_split[0] case "FR-GES-CTS": - return "A" + return train.routeShortName.split(" ")[1] case "FR-EUROSTAR": return "Eurostar" case "IT-FRA-TI": @@ -216,7 +220,6 @@ function getTrainType(train) { return "NJ" return "ÖBB" case "CH-ALL": - return "A" default: return train.routeShortName?.split(" ")[0] }