feat: create v2 for module support
All checks were successful
Deploy / deploy (push) Successful in 1m21s
All checks were successful
Deploy / deploy (push) Successful in 1m21s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import { BrowserRouter, Route, Switch } from 'react-router-dom';
|
||||
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
||||
|
||||
import './paste/Framework.css';
|
||||
|
||||
@@ -20,7 +20,7 @@ class App extends Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
req('https://paste.dn42.us/app-info').get()
|
||||
req('/app-info').get()
|
||||
.then((response) => {
|
||||
if (response.ok) return response.text().catch(()=>"");
|
||||
else return "Unknown API"; })
|
||||
@@ -30,20 +30,16 @@ componentDidMount() {
|
||||
render() {
|
||||
const {api, name} = this.state;
|
||||
return (
|
||||
<BrowserRouter basename={'/ui'}>
|
||||
<React.Fragment key={1}>
|
||||
<>
|
||||
<section className="container-responsive">
|
||||
<Switch>
|
||||
<Route path={`/`} component={Paste} />
|
||||
</Switch>
|
||||
<Paste />
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<span className="left text-muted">{name}</span>
|
||||
<span className="right text-muted">{api}</span>
|
||||
</footer>
|
||||
</React.Fragment>
|
||||
</BrowserRouter>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user