diff --git a/src/components/trays/layers/list.js b/src/components/trays/layers/list.js index bcd48f58..d7782f9f 100644 --- a/src/components/trays/layers/list.js +++ b/src/components/trays/layers/list.js @@ -19,7 +19,6 @@ import { ArrowDropUp as MoveUpArrow, ArrowDropDown as MoveDownArrow, Schedule as ClockIcon, - DragIndicator as DragHandleIcon, Opacity as OpacityIcon, Palette as ColorRampIcon, } from '@mui/icons-material'; @@ -53,7 +52,6 @@ export const LayersList = () => { const LayerCard = ({ index, layer }) => { const { layerTypes, - removeLayer, swapLayers, toggleLayerVisibility, } = useLayers(); @@ -61,10 +59,6 @@ const LayerCard = ({ index, layer }) => { const isVisible = layer.state.visible; const LayerIcon = layerTypes[layer.properties.product_type].icon; - const handleClickRemove = id => () => { - removeLayer(id); - }; - return ( { }} > - - + {layerTypes[layer.properties.product_type].name} + toggleLayerVisibility(layer.id) } + className="actions" + /> - - - - + { new Date(layer.properties.run_date).toLocaleString() } - - Cycle { layer.properties.cycle } - + + + Cycle { layer.properties.cycle } - {/* layer card actions start */} - - toggleLayerVisibility(layer.id) } - /> - - - - - - - - - - - - - - - { > - {/* layer card actions end */} - { + { + const { removeLayer } = useLayers(); + + return ( + + + + + + + + + + + + removeLayer(layerId) } + > + + + + ); +}; + +LayerActions.propTypes = { + layerId: PropTypes.string.isRequired, +};