diff --git a/src/panels/Fahrplan/components/PlanElement.tsx b/src/panels/Fahrplan/components/PlanElement.tsx index 7f366b53af21ac44e39d5513ee48616654c4f771..0f34b18cbe03d612895297efc60fbc74001e5714 100644 --- a/src/panels/Fahrplan/components/PlanElement.tsx +++ b/src/panels/Fahrplan/components/PlanElement.tsx @@ -22,8 +22,8 @@ const PlanElement = (props: { )}> {props.trainIdentifier} </div> - <h3 className={"text-xl"}> - {props.trainHeading} + <h3 className={"text-xl leading-9"}> + {deDortmund(props.trainHeading)} </h3> </div> @@ -34,8 +34,9 @@ const PlanElement = (props: { <ProgressIndicator first={index === 0} id={stop.name} - name={stop.name} + name={deDortmund(stop.name)} arrival={stop.arrival} + delay={stop.delay} /> )) } @@ -63,3 +64,13 @@ const trainIdentifierToColor = (identifier: string): string => { return "bg-zinc-700"; } + +const deDortmund = (input: string): string => { + // Don't remove the city from central station location + if(input.toLowerCase().includes("HBf")) { + return input; + } + + // In all other cases, remove dortmund + return input.replaceAll("Dortmund ", ""); +}