vom laptop
This commit is contained in:
45
src/App.tsx
45
src/App.tsx
@ -1,24 +1,27 @@
|
||||
import React from 'react';
|
||||
import './App.css';
|
||||
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';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<p>
|
||||
Edit <code>src/App.tsx</code> and save to reload.
|
||||
</p>
|
||||
<a
|
||||
className="App-link"
|
||||
href="https://reactjs.org"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Learn React XXXX
|
||||
</a>
|
||||
</header>
|
||||
</div>
|
||||
);
|
||||
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 App;
|
||||
export default function App()
|
||||
{
|
||||
return(
|
||||
<div className='App'>
|
||||
{/* <SeasonTable seasondata = {seasondata} /> */}
|
||||
<FlightsTable flightdata = {data}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user