From 6ad36d0fc84830a127805ddafae5f653ccb5d4a0 Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Wed, 15 Nov 2023 22:57:39 -0500 Subject: [PATCH] fixing errors --- .../src/core/components/layers/left-panel/layers-actions.tsx | 3 ++- packages/geoview-core/src/core/components/layers/types.ts | 2 ++ .../stores/store-interface-and-intial-values/layer-state.ts | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/geoview-core/src/core/components/layers/left-panel/layers-actions.tsx b/packages/geoview-core/src/core/components/layers/left-panel/layers-actions.tsx index e7ce340e4b6..75767314f31 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/layers-actions.tsx +++ b/packages/geoview-core/src/core/components/layers/left-panel/layers-actions.tsx @@ -4,6 +4,7 @@ import { Button } from '@mui/material'; import { Box, Typography, ExpandIcon, RemoveCircleOutlineIcon, AddCircleOutlineIcon, ButtonGroup } from '@/ui'; import { getSxClasses } from '../layers-style'; import { useLayerStoreActions, useLayersDisplayState } from '@/core/stores/store-interface-and-intial-values/layer-state'; +import { TypeLayersViewDisplayState } from '../types'; export function LayersActions(): JSX.Element { const { t } = useTranslation(); @@ -15,7 +16,7 @@ export function LayersActions(): JSX.Element { const displayState = useLayersDisplayState(); const { setDisplayState } = useLayerStoreActions(); - const handleSetDisplayState = function (newState: string) { + const handleSetDisplayState = function (newState: TypeLayersViewDisplayState) { setDisplayState(newState); }; diff --git a/packages/geoview-core/src/core/components/layers/types.ts b/packages/geoview-core/src/core/components/layers/types.ts index 342d9156003..d07ddf393e9 100644 --- a/packages/geoview-core/src/core/components/layers/types.ts +++ b/packages/geoview-core/src/core/components/layers/types.ts @@ -50,6 +50,8 @@ export interface TypeLegendItemDetailsProps { /// ////////////////////////////////////////////////// +export type TypeLayersViewDisplayState = 'remove' | 'add' | 'order' | 'view'; + export type TypeLegendLayerIcon = { iconType?: string; iconImg?: string; diff --git a/packages/geoview-core/src/core/stores/store-interface-and-intial-values/layer-state.ts b/packages/geoview-core/src/core/stores/store-interface-and-intial-values/layer-state.ts index 56efa4a04fe..17093818ac0 100644 --- a/packages/geoview-core/src/core/stores/store-interface-and-intial-values/layer-state.ts +++ b/packages/geoview-core/src/core/stores/store-interface-and-intial-values/layer-state.ts @@ -3,11 +3,9 @@ import { useStore } from 'zustand'; import _ from 'lodash'; import { useGeoViewStore } from '../stores-managers'; -import { TypeLegendLayer } from '../../components/layers/types'; +import { TypeLayersViewDisplayState, TypeLegendLayer } from '../../components/layers/types'; import { TypeGetStore, TypeSetStore } from '../geoview-store'; -type TypeLayersViewDisplayState = 'remove' | 'add' | 'order' | 'view'; - export interface ILayerState { selectedItem?: TypeLegendLayer; selectedIsVisible: boolean;