Dodano rozwijanie RJ przy przenoszeniu z innej zakładki

This commit is contained in:
2021-06-11 13:46:42 +02:00
parent e90911dd98
commit c5b781de86
5 changed files with 30 additions and 30 deletions
-16
View File
@@ -1,16 +0,0 @@
export default interface Timetable {
trainNo: number;
driverName: string;
category: string;
stopName: string;
stopType: string;
arrivalTime: number;
arrivalDelay: number;
departureTime: number;
departureDelay: number;
confirmed: boolean;
stopped: boolean;
stopTime: number;
beginsHere: boolean;
terminatesHere: boolean;
}
+7 -5
View File
@@ -71,11 +71,13 @@ const parseSpawns = (spawnString: string) => {
const getTimestamp = (date: string | null) => (date ? new Date(date).getTime() : 0);
const timestampToString = (timestamp: number) =>
new Date(timestamp).toLocaleTimeString("pl-PL", {
hour: "2-digit",
minute: "2-digit"
});
const timestampToString = (timestamp: number | null) =>
timestamp
? new Date(timestamp).toLocaleTimeString("pl-PL", {
hour: "2-digit",
minute: "2-digit"
})
: "";
const getTrainStopStatus = (stopInfo: TrainStop, timetableData: { currentStationName: string }, station: Station) => {
let stopStatus: string = "",