import React, {Component} from 'react'; import './App.scss'; import Header from "./Header"; import MainPane from "../components/panels/MainPane"; import Footer from "./Footer"; import {BrowserRouter as Router} from "react-router-dom"; import Filters from "./Filters"; import backend from "../backend"; import ConfigurationPane from "../components/panels/ConfigurationPane"; import log from "../log"; class App extends Component { state = {}; componentDidMount() { backend.get("/api/services").then(_ => { log.debug("Caronte is already configured. Loading main.."); this.setState({configured: true}); }); setInterval(() => { if (document.title.endsWith("❚")) { document.title = document.title.slice(0, -1); } else { document.title += "❚"; } }, 500); } render() { let modal; if (this.state.filterWindowOpen && this.state.configured) { modal = this.setState({filterWindowOpen: false})}/>; } return (
this.setState({filterWindowOpen: true})}/>
{this.state.configured ? : this.setState({configured: true})}/>} {modal}
{this.state.configured &&
); } } export default App;