import React, { Component } from 'react'; import Service from './Service.js'; import './App.css'; const ENDPOINT = 'https://elstatus.stayathomeserver.club/api/status' export default class App extends Component { state = { loading: true, error: null, metrics: null, }; componentDidMount() { fetch(ENDPOINT) .then((resp) => resp.json()) .then((data) => { this.setState({ metrics: data, loading: false }); }) .catch((error) => { this.setState({ error: error.toString() }); }) } render() { const metrics = !this.state.metrics ? null : (