Reorganize React project structure.

Whatever I was doing was getting out of control :)
This commit is contained in:
Dan Albert
2022-03-01 00:48:08 -08:00
parent 406a64ae3f
commit 6ff9208d46
19 changed files with 67 additions and 66 deletions

View File

@@ -0,0 +1,20 @@
import FlightPlan from "../flightplan";
import { LayerGroup } from "react-leaflet";
import { selectFlights } from "../../api/flightsSlice";
import { useAppSelector } from "../../app/hooks";
interface FlightPlansLayerProps {
blue: boolean;
}
export default function FlightPlansLayer(props: FlightPlansLayerProps) {
const atos = useAppSelector(selectFlights);
const flights = props.blue ? atos.blue : atos.red;
return (
<LayerGroup>
{Object.values(flights).map((flight) => {
return <FlightPlan key={flight.id} flight={flight} selected={false} />;
})}
</LayerGroup>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./FlightPlansLayer";