update to new react UI and various fixes

This commit is contained in:
Jon Lundy
2018-03-13 16:25:18 -06:00
parent 1dcd0f73cf
commit 0a6fa4bc53
14 changed files with 98 additions and 82 deletions

View File

@@ -1,19 +1,22 @@
import React, { Component } from 'react';
import Paste from './vendor/src/paste/Paste';
import Framework from './vendor/src/sour-is/Framework';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import { remoteService } from "./vendor/src/sour-is/RemoteService";
import 'bootstrap/dist/css/bootstrap.css';
import 'sour-is/src/sour-is/Framework.css';
import Paste from './vendor/sour-is/src/paste/Paste';
import { remoteService } from "./vendor/sour-is/src/sour-is/RemoteService";
const req = remoteService();
const APP_NAME = "DN42 Paste UI";
class App extends Component {
constructor(){
super()
super();
this.state = {
name: APP_NAME,
api: "Paste API (Version Snapshot)"
api: "Paste API (Version Snapshot)",
}
}
@@ -22,7 +25,7 @@ componentDidMount() {
.then((response) => {
if (response.ok) return response.text().catch(()=>"");
else return "Unknown API"; })
.then((text) => { this.setState({app:{name: APP_NAME, api: text}}); });
.then((text) => { this.setState({api: text}); });
}
render() {