Skip to content

Commit

Permalink
Merge pull request #46 from RENCI/product-type-to-name
Browse files Browse the repository at this point in the history
Removing the hard-code mapping of product type to product name.
  • Loading branch information
mbwatson authored May 16, 2024
2 parents c31ee14 + fdd418e commit 749ac4d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/trays/layers/layer-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const LayerCard = ({ index, layer }) => {
<LayerIcon size="lg" color="primary" />
</Avatar>
<Typography level="title-md">
{layerTypes[layer.properties.product_type].name}
{layer.properties.product_name}
</Typography>
<Switch
size="sm"
Expand Down
6 changes: 0 additions & 6 deletions src/context/map-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,21 @@ export const useLayers = () => 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,
},
};
Expand Down

0 comments on commit 749ac4d

Please sign in to comment.