From 1edbae1a0224e30bafb98638f419e1f967a9286f Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 13 May 2021 17:42:53 +0200 Subject: ui: Move modal state outside of Redux This change updates the frontend so that the modal state is not stored inside Redux but instead is stored using the useState hook. This simplifies the design of the modal components. --- .../app/sidebars/project/TopologyListComponent.js | 38 +++++++++++++--------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'opendc-web/opendc-web-ui/src/components/app/sidebars/project/TopologyListComponent.js') diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/project/TopologyListComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/project/TopologyListComponent.js index a7d78c4a..d5627abc 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/project/TopologyListComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/project/TopologyListComponent.js @@ -2,37 +2,45 @@ import PropTypes from 'prop-types' import React from 'react' import { Topology } from '../../../../shapes' import FontAwesome from 'react-fontawesome' +import { Button, Col, Row } from 'reactstrap' +import classNames from 'classnames' function TopologyListComponent({ topologies, currentTopologyId, onChooseTopology, onNewTopology, onDeleteTopology }) { return (

Topologies - +

{topologies.map((topology, idx) => ( -
-
+ {topology.name} -
-
- + +
-
+ + ))}
) -- cgit v1.2.3