diff options
Diffstat (limited to 'frontend/src/views/MainPane.js')
-rw-r--r-- | frontend/src/views/MainPane.js | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/frontend/src/views/MainPane.js b/frontend/src/views/MainPane.js deleted file mode 100644 index 69de725..0000000 --- a/frontend/src/views/MainPane.js +++ /dev/null @@ -1,46 +0,0 @@ -import React, {Component} from 'react'; -import './MainPane.scss'; -import Connections from "./Connections"; -import ConnectionContent from "../components/ConnectionContent"; -import {withRouter} from "react-router-dom"; -import axios from 'axios'; - -class MainPane extends Component { - - constructor(props) { - super(props); - this.state = { - selectedConnection: null - }; - } - - componentDidMount() { - if ('id' in this.props.match.params) { - const id = this.props.match.params.id; - axios.get(`/api/connections/${id}`).then(res => { - if (res.status === 200) { - this.setState({selectedConnection: res.data}); - } - }); - } - } - - render() { - return ( - <div className="main-pane"> - <div className="container-fluid"> - <div className="row"> - <div className="col-md-6 pane"> - <Connections onSelected={(c) => this.setState({selectedConnection: c})} /> - </div> - <div className="col-md-6 pl-0 pane"> - <ConnectionContent connection={this.state.selectedConnection}/> - </div> - </div> - </div> - </div> - ); - } -} - -export default withRouter(MainPane); |