FlightsTable component props <=> parameter

This commit is contained in:
Peter Hoppe
2022-12-06 11:40:35 +01:00
parent 5357f51bf2
commit 03d11bc278
6 changed files with 31 additions and 57 deletions

View File

@ -21,8 +21,7 @@ function Meter2Km(key: string, row: any, data: string | null)
return val;
}
//export default function FlightsTable(flightdata: IFlight[])
export default function FlightsTable(flightdata: any)
export default function FlightsTable({flightdata}: {flightdata: CFlight[]})
{
const headers: THeader[] = [
{ key: "IDFlight", label: "ID", visible: false },
@ -31,7 +30,8 @@ export default function FlightsTable(flightdata: any)
{ key: "Glider", label: "Gleitschirm" },
{ key: "BestTaskDistance", label: "Strecke", callback: Meter2Km },
{ key: "BestTaskType", label: "Streckentyp" },
{ key: "BestTaskPoints", label: "Punkte" }
{ key: "BestTaskPoints", label: "Punkte" },
{ key: "FlightDurationDispl", label: "Dauer" }
];
return(