text: import "devextreme/dist/css/dx.common.css";
  import "devextreme/dist/css/dx.light.css";
  import React from "react";
  import { Switch, Route, BrowserRouter as Router } from "react-router-dom";
  import Home from "./home";
  
  class App extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        items: [],
        isLoaded: false,
      };
    }
  
    componentDidMount() {
      fetch("/")
        .then((res) => res.json())
        .then((result) => {
          this.setState({
            isLoaded: true,
            items: result,
          });
        });
    }
  
    render() {
      return (
        <Router>
          <Switch>
            <Route exact path="/" component={Home} />
            {/* <Route exact path="/sniffer" component={ThreatIntel} /> */}
          </Switch>
        </Router>
      );
    }
  }
  
  export default App;
  