From 46588036488a0132423f7eb01815aa658c1686e3 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 7428750ea..2c2a5ae2a 100644 --- a/src/reducers/controls.ts +++ b/src/reducers/controls.ts @@ -12,9 +12,11 @@ import { calcBrowserDimensionsInitialState } from "./browserDimensions"; import { doesColorByHaveConfidence } from "../actions/recomputeReduxState"; import { hasMultipleGridPanels } from "../actions/panelDisplay"; +type Layout = "rect" | "radial" | "unrooted" | "clock" | "scatter" + interface Defaults { distanceMeasure: string - layout: string + layout: Layout geoResolution: string filters: Record filtersInFooter: string[] @@ -27,6 +29,7 @@ interface Defaults { export interface BasicControlsState { defaults: Defaults + layout: Layout panelsAvailable: string[] panelsToDisplay: string[] showTreeToo: boolean