mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
mocking danych
This commit is contained in:
@@ -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 [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user