update to new react UI and various fixes
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user