From ceec8816c6a764a44e0a61cc81cb767eff564b0e Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:25:13 -0700 Subject: [PATCH] Add type for state.controls.layout --- src/reducers/controls.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/reducers/controls.ts b/src/reducers/controls.ts index 684297656..239317460 100644 --- a/src/reducers/controls.ts +++ b/src/reducers/controls.ts @@ -12,8 +12,11 @@ import { calcBrowserDimensionsInitialState } from "./browserDimensions"; import { doesColorByHaveConfidence } from "../actions/recomputeReduxState"; import { hasMultipleGridPanels } from "../actions/panelDisplay"; +type Layout = "rect" | "radial" | "unrooted" | "clock" | "scatter" + export interface BasicControlsState { defaults: Defaults + layout: Layout panelsAvailable: string[] panelsToDisplay: string[] showTreeToo: boolean @@ -39,7 +42,7 @@ export interface ControlsState extends BasicControlsState, MeasurementsControlSt interface Defaults { distanceMeasure: string - layout: string + layout: Layout geoResolution: string filters: Record filtersInFooter: string[]