From fdd418e71d283fcfbe73b66de248aa244cc7893e Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Thu, 16 May 2024 11:09:44 -0400 Subject: [PATCH] removing the hard-code mapping of product type to product name. --- src/components/trays/layers/layer-card.js | 2 +- src/context/map-context.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/components/trays/layers/layer-card.js b/src/components/trays/layers/layer-card.js index 0247da06..c298ba86 100644 --- a/src/components/trays/layers/layer-card.js +++ b/src/components/trays/layers/layer-card.js @@ -68,7 +68,7 @@ export const LayerCard = ({ index, layer }) => { - {layerTypes[layer.properties.product_type].name} + {layer.properties.product_name} useContext(LayersContext); // convert the product type to a readable layer name const layerTypes = { obs: { - name: "Observations", icon: ObservationIcon, }, maxwvel63: { - name: "Maximum Wind Velocity", icon: WindVelocityIcon, }, maxele63: { - name: "Maximum Water Level", icon: WaterLevelIcon, }, swan_HS_max63: { - name: "Maximum Wave Height", icon: WaveHeightIcon, }, maxele_level_downscaled_epsg4326: { - name: "Hi-Res Maximum Water Level", icon: WaterLevelIcon, }, hec_ras_water_surface: { - name: "HEC/RAS Water Surface", icon: WaterSurfaceIcon, }, };