mocking danych

This commit is contained in:
2023-10-01 00:23:17 +02:00
parent 6aec1a75c9
commit f60263c923
3 changed files with 17074 additions and 55 deletions
+2 -3
View File
@@ -2,8 +2,7 @@ import { ScheduledTrain, StopStatus } from '../interfaces/ScheduledTrain';
import Train from '../interfaces/Train';
import TrainStop from '../interfaces/TrainStop';
export const getLocoURL = (locoType: string): string =>
`https://rj.td2.info.pl/dist/img/thumbnails/${locoType.includes('EN') ? locoType + 'rb' : locoType}.png`;
export const getLocoURL = (locoType: string): string => `https://rj.td2.info.pl/dist/img/thumbnails/${locoType.includes('EN') ? locoType + 'rb' : locoType}.png`;
export const getStatusID = (stationStatus: any): string => {
if (!stationStatus) return 'unknown';
@@ -58,7 +57,7 @@ export const getStatusTimestamp = (stationStatus: any): number => {
return -1;
};
export const parseSpawns = (spawnString: string) => {
export const parseSpawns = (spawnString: string | null) => {
if (!spawnString) return [];
if (spawnString === 'NO_SPAWN') return [];