import React from "react";
import SortableTable from "./SortableTable";
import {CSeason} from '../classes/CSeason';
import {THeader} from "./SortableTable";
import {Meter2Km, FixNachKomma00} from "./FlightsTable";

export default function SeasonTable({seasondata}:{seasondata: CSeason[]}) 
{
    const headers: THeader[] = [
        { key: "id", label: "Saison" },
        { key: "flightCount", label: "Anzahl" },
        { key: "flighttimeDisp", label: "Dauer" },
        { key: "distance", label: "Strecke", callback: Meter2Km },
        { key: "points", label: "Punkte", callback: FixNachKomma00 }
      ];
    
      return(
        <div className='App'>
          <SortableTable<CSeason> headers={headers} dataTbl={seasondata} ></SortableTable>
        </div>
          );
        }
  