Run prettier across the react source.

This commit is contained in:
Dan Albert
2022-03-03 23:34:18 -08:00
parent 13ca5352c7
commit a710ce5e1b
30 changed files with 85 additions and 104 deletions

View File

@@ -1,8 +1,7 @@
import { Circle, LayerGroup } from "react-leaflet";
import Tgo from "../../api/tgo";
import { selectTgos } from "../../api/tgosSlice";
import { useAppSelector } from "../../app/hooks";
import { Circle, LayerGroup } from "react-leaflet";
interface TgoRangeCirclesProps {
tgo: Tgo;

View File

@@ -1,9 +1,8 @@
import { Icon, Point } from "leaflet";
import { Marker, Tooltip } from "react-leaflet";
import { ControlPoint as ControlPointModel } from "../../api/controlpoint";
import { Symbol as MilSymbol } from "milsymbol";
import backend from "../../api/backend";
import { ControlPoint as ControlPointModel } from "../../api/controlpoint";
import { Icon, Point } from "leaflet";
import { Symbol as MilSymbol } from "milsymbol";
import { Marker, Tooltip } from "react-leaflet";
function iconForControlPoint(cp: ControlPointModel) {
const symbol = new MilSymbol(cp.sidc, {

View File

@@ -1,7 +1,7 @@
import ControlPoint from "../controlpoints";
import { LayerGroup } from "react-leaflet";
import { selectControlPoints } from "../../api/controlPointsSlice";
import { useAppSelector } from "../../app/hooks";
import ControlPoint from "../controlpoints";
import { LayerGroup } from "react-leaflet";
export default function ControlPointsLayer() {
const controlPoints = useAppSelector(selectControlPoints);

View File

@@ -1,6 +1,6 @@
import { Flight } from "../../api/flight";
import { Polyline } from "react-leaflet";
import WaypointMarker from "../waypointmarker";
import { Polyline } from "react-leaflet";
const BLUE_PATH = "#0084ff";
const RED_PATH = "#c85050";

View File

@@ -1,8 +1,8 @@
import { Flight } from "../../api/flight";
import FlightPlan from "../flightplan";
import { LayerGroup } from "react-leaflet";
import { selectFlights } from "../../api/flightsSlice";
import { useAppSelector } from "../../app/hooks";
import FlightPlan from "../flightplan";
import { LayerGroup } from "react-leaflet";
interface FlightPlansLayerProps {
blue: boolean;

View File

@@ -1,7 +1,7 @@
import FrontLine from "../frontline";
import { LayerGroup } from "react-leaflet";
import { selectFrontLines } from "../../api/frontLinesSlice";
import { useAppSelector } from "../../app/hooks";
import FrontLine from "../frontline";
import { LayerGroup } from "react-leaflet";
export default function SupplyRoutesLayer() {
const fronts = useAppSelector(selectFrontLines).fronts;

View File

@@ -1,15 +1,13 @@
import "./LiberationMap.css";
import { LayersControl, MapContainer, ScaleControl } from "react-leaflet";
import AirDefenseRangeLayer from "../airdefenserangelayer";
import { BasemapLayer } from "react-esri-leaflet";
import ControlPointsLayer from "../controlpointslayer";
import FlightPlansLayer from "../flightplanslayer";
import FrontLinesLayer from "../frontlineslayer";
import { LatLng } from "leaflet";
import SupplyRoutesLayer from "../supplyrouteslayer";
import TgosLayer from "../tgoslayer/TgosLayer";
import "./LiberationMap.css";
import { LatLng } from "leaflet";
import { BasemapLayer } from "react-esri-leaflet";
import { LayersControl, MapContainer, ScaleControl } from "react-leaflet";
interface GameProps {
mapCenter: LatLng;

View File

@@ -1,8 +1,6 @@
// Based on https://thenable.io/building-a-use-socket-hook-in-react.
import { ReactChild, createContext, useEffect, useState } from "react";
import { WEBSOCKET_URL } from "../../api/backend";
import { ReactChild, createContext, useEffect, useState } from "react";
const socket = new WebSocket(WEBSOCKET_URL);

View File

@@ -1,9 +1,8 @@
import { Polyline, Tooltip } from "react-leaflet";
import { useEffect, useRef } from "react";
import { Polyline as LPolyline } from "leaflet";
import SplitLines from "../splitlines/SplitLines";
import { SupplyRoute as SupplyRouteModel } from "../../api/supplyroute";
import SplitLines from "../splitlines/SplitLines";
import { Polyline as LPolyline } from "leaflet";
import { useEffect, useRef } from "react";
import { Polyline, Tooltip } from "react-leaflet";
interface SupplyRouteProps {
route: SupplyRouteModel;

View File

@@ -1,7 +1,7 @@
import { LayerGroup } from "react-leaflet";
import SupplyRoute from "../supplyroute/SupplyRoute";
import { selectSupplyRoutes } from "../../api/supplyRoutesSlice";
import { useAppSelector } from "../../app/hooks";
import SupplyRoute from "../supplyroute/SupplyRoute";
import { LayerGroup } from "react-leaflet";
export default function SupplyRoutesLayer() {
const routes = useAppSelector(selectSupplyRoutes).routes;

View File

@@ -1,9 +1,8 @@
import { Icon, Point } from "leaflet";
import { Marker, Tooltip } from "react-leaflet";
import { Symbol as MilSymbol } from "milsymbol";
import SplitLines from "../splitlines/SplitLines";
import { Tgo as TgoModel } from "../../api/tgo";
import SplitLines from "../splitlines/SplitLines";
import { Icon, Point } from "leaflet";
import { Symbol as MilSymbol } from "milsymbol";
import { Marker, Tooltip } from "react-leaflet";
function iconForTgo(cp: TgoModel) {
const symbol = new MilSymbol(cp.sidc, {

View File

@@ -1,7 +1,7 @@
import { LayerGroup } from "react-leaflet";
import Tgo from "../tgos/Tgo";
import { selectTgos } from "../../api/tgosSlice";
import { useAppSelector } from "../../app/hooks";
import Tgo from "../tgos/Tgo";
import { LayerGroup } from "react-leaflet";
interface TgosLayerProps {
categories?: string[];

View File

@@ -1,11 +1,10 @@
import { Marker, Tooltip, useMap, useMapEvent } from "react-leaflet";
import { MutableRefObject, useCallback, useRef } from "react";
import { Waypoint } from "../../api/waypoint";
import { Icon } from "leaflet";
import { Marker as LMarker } from "leaflet";
import { Waypoint } from "../../api/waypoint";
import icon from "leaflet/dist/images/marker-icon.png";
import iconShadow from "leaflet/dist/images/marker-shadow.png";
import { MutableRefObject, useCallback, useRef } from "react";
import { Marker, Tooltip, useMap, useMapEvent } from "react-leaflet";
const WAYPOINT_ICON = new Icon({
iconUrl: icon,