mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 11:45:34 +00:00
chorse: changed api data to stored locally
This commit is contained in:
@@ -2,7 +2,7 @@ import {
|
||||
ICarWagon,
|
||||
ILocomotive,
|
||||
IStock,
|
||||
IVehiclesAPI,
|
||||
IVehiclesData,
|
||||
LocoGroupType,
|
||||
WagonGroupType,
|
||||
} from '../types';
|
||||
@@ -17,7 +17,7 @@ export function isTractionUnit(vehicle: ILocomotive | ICarWagon): vehicle is ILo
|
||||
return (vehicle as ILocomotive).cabinType !== undefined;
|
||||
}
|
||||
|
||||
export function locoDataList(vehiclesData: IVehiclesAPI | undefined) {
|
||||
export function locoDataList(vehiclesData: IVehiclesData | undefined) {
|
||||
if (!vehiclesData) return [];
|
||||
|
||||
return vehiclesData.vehicleList.reduce<ILocomotive[]>((acc, vehicleInfoArray) => {
|
||||
@@ -53,7 +53,7 @@ export function locoDataList(vehiclesData: IVehiclesAPI | undefined) {
|
||||
}, []);
|
||||
}
|
||||
|
||||
export function carDataList(vehiclesData: IVehiclesAPI | undefined) {
|
||||
export function carDataList(vehiclesData: IVehiclesData | undefined) {
|
||||
if (!vehiclesData) return [];
|
||||
|
||||
console.log(vehiclesData);
|
||||
|
||||
Reference in New Issue
Block a user