Skip to content

Commit 4c3cac0

Browse files
committed
Fix formatting by using prettier defaults
1 parent cf0f077 commit 4c3cac0

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

web-vite/src/app/reducer/index.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { useReducerAsync } from 'use-reducer-async';
2-
import logReducer from './log.ts';
3-
import { calculateStats, getFgbData } from '../map/utils.ts';
4-
import tArea from '@turf/area';
5-
import tBboxPolygon from '@turf/bbox-polygon';
1+
import { useReducerAsync } from "use-reducer-async";
2+
import logReducer from "./log.ts";
3+
import { calculateStats, getFgbData } from "../map/utils.ts";
4+
import tArea from "@turf/area";
5+
import tBboxPolygon from "@turf/bbox-polygon";
66

77
export enum MapStatus {
8-
IDLE = 'IDLE',
9-
LOADING = 'LOADING',
10-
READY = 'READY',
8+
IDLE = "IDLE",
9+
LOADING = "LOADING",
10+
READY = "READY",
1111
}
1212

1313
export interface AppState {
@@ -18,12 +18,12 @@ export interface AppState {
1818
}
1919

2020
export enum AppActionTypes {
21-
SET_MAP_REF = 'SET_MAP_REF',
22-
SET_CURRENT_TIMESTAMP = 'SET_CURRENT_TIMESTAMP',
23-
UPDATE_VIEW = 'UPDATE_VIEW',
24-
UPDATE_VIEW_START = 'UPDATE_VIEW_START',
25-
UPDATE_VIEW_SUCCESS = 'UPDATE_VIEW_SUCCESS',
26-
UPDATE_VIEW_ERROR = 'UPDATE_VIEW_ERROR',
21+
SET_MAP_REF = "SET_MAP_REF",
22+
SET_CURRENT_TIMESTAMP = "SET_CURRENT_TIMESTAMP",
23+
UPDATE_VIEW = "UPDATE_VIEW",
24+
UPDATE_VIEW_START = "UPDATE_VIEW_START",
25+
UPDATE_VIEW_SUCCESS = "UPDATE_VIEW_SUCCESS",
26+
UPDATE_VIEW_ERROR = "UPDATE_VIEW_ERROR",
2727
}
2828

2929
export type AppAction =
@@ -57,7 +57,7 @@ export const appInitialState = {
5757
map: undefined,
5858
mapStatus: MapStatus.IDLE,
5959
geojson: {
60-
type: 'FeatureCollection',
60+
type: "FeatureCollection",
6161
features: [],
6262
},
6363
};
@@ -66,7 +66,7 @@ export type AppReducer<State, Action> = (state: State, action: Action) => State;
6666

6767
function applyTimestampFilter(geojson: any, timestamp: string) {
6868
return {
69-
type: 'FeatureCollection',
69+
type: "FeatureCollection",
7070
features: geojson.features.filter(
7171
(f: any) => f.properties.timestamp === timestamp
7272
),
@@ -152,7 +152,7 @@ const asyncActionHandlers: any = {
152152

153153
const { geojson, timestamps } = await getFgbData(map);
154154

155-
map.getSource('data').setData(geojson);
155+
map.getSource("data").setData(geojson);
156156

157157
dispatch({
158158
type: AppActionTypes.UPDATE_VIEW_SUCCESS,
@@ -161,7 +161,7 @@ const asyncActionHandlers: any = {
161161
} catch (error) {
162162
console.log(error);
163163
alert(
164-
'Unexpected error while loading the map, please see console log.'
164+
"Unexpected error while loading the map, please see console log."
165165
);
166166
}
167167
},

0 commit comments

Comments
 (0)