From 419297128ce2ab2c8085c81fafdb843c1135661d Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 14 Sep 2022 13:49:58 +0200 Subject: fix(web/ui): Fix deletion of topology This change fixes an issue with the OpenDC web interface where the user cannot remove an existing topology from the topology table due to a programming mistake. --- opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js') diff --git a/opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js b/opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js index 21be3c79..ef5af263 100644 --- a/opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js +++ b/opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js @@ -28,9 +28,9 @@ import TileGroup from './groups/TileGroup' function TileContainer({ tileId, ...props }) { const interactionLevel = useSelector((state) => state.interactionLevel) + const dispatch = useDispatch() const tile = useSelector((state) => state.topology.tiles[tileId]) - const dispatch = useDispatch() const onClick = (tile) => { if (tile.rack) { dispatch(goFromRoomToRack(tile.id)) -- cgit v1.2.3