28 lines
717 B
TypeScript
28 lines
717 B
TypeScript
import React from "react";
|
|
import "./App.css";
|
|
import FlightsTable from "./components/FlightsTable";
|
|
import SeasonTable from "./components/SeasonTable";
|
|
import {groupByMap} from './global/tools';
|
|
import flights from './data/HoPe_all_flights.json';
|
|
import {IFlight} from './interfaces/IFlights';
|
|
import {CSeason} from './classes/CSeason';
|
|
|
|
const data = flights.data;
|
|
const seasondataraw = groupByMap(data, i => i.FKSeason);
|
|
const seasondata: CSeason[] = [];
|
|
|
|
for (let [key, value] of seasondataraw)
|
|
{
|
|
seasondata.push(new CSeason(key, value));
|
|
}
|
|
|
|
export default function App()
|
|
{
|
|
return(
|
|
<div className='App'>
|
|
{/* <SeasonTable seasondata = {seasondata} /> */}
|
|
<FlightsTable flightdata = {data}/>
|
|
</div>
|
|
);
|
|
}
|