import React, { useState } from 'react'; import './App.css'; import { Col, Container, Nav, Row } from 'react-bootstrap'; import API from './utils/API.js'; import ErrorCatcher from './components/ErrorCatcher.js'; import { BrowserRouter as Router, Link, NavLink, Redirect, Route, Switch } from 'react-router-dom'; import AccountsPage from './page/Accounts'; import IntermediateHashPage from './page/IntermediateHashPage'; import { ReactComponent as Logo } from './logo.svg'; import StoragePage from './page/Storage'; import RemoteSidebar from './components/RemoteSidebar'; import DBPage from './page/DBPage'; const sidebar = [ { url: '/accounts', label: 'Accounts', }, { url: '/storage', label: 'Storage', }, { url: '/intermediate-hash', label: 'Inter Hash', }, { url: '/db', label: 'DB', }, ]; function App() { const [host, setHost] = useState('localhost'); const [port, setPort] = useState('8080'); const onApiChange = (data) => { setHost(data.host); setPort(data.port); }; const api = new API('http://' + host + ':' + port); return ( ); } export default App;