render() { const { response, isLoading } = this.state; return ( <div className={styles.bstyles}> <Card bg="light" style={{ width: "18rem" }}> <Card.Header>{response.name}</Card.Header> <Card.Body> <Card.Text> Address: {response.address} <br /> Freespace: {response.freespace} / {response.totalspace} <br /> </Card.Text> </Card.Body> <Card.Footer> <small className="text-muted">Updated {response.timestamp}</small> </Card.Footer> </Card> <Button size="sm" disabled={isLoading} onClick={!isLoading ? this.fetchOpenData : null} > {isLoading ? "Updating" : "REFRESH"} </Button> </div> ); }