parent
23d7c33667
commit
9eabd1738e
File diff suppressed because one or more lines are too long
@ -1,6 +0,0 @@
|
||||
.App {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: stretch;
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Button } from 'antd';
|
||||
import './App.css';
|
||||
|
||||
class App extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Button type="primary">Button</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
@ -0,0 +1,3 @@
|
||||
.App {
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
import React, { Component } from 'react';
|
||||
import { BrowserRouter as Router, Route, Redirect } from 'react-router-dom';
|
||||
|
||||
import Dashboard from '../dashboard/Dashboard';
|
||||
|
||||
import './App.css';
|
||||
|
||||
class App extends Component {
|
||||
render() {
|
||||
return(
|
||||
<Router>
|
||||
<div>
|
||||
<Redirect from="/" to="dashboard" />
|
||||
<Route path="/dashboard" component={Dashboard} />
|
||||
</div>
|
||||
</Router>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
@ -0,0 +1,3 @@
|
||||
.Dashboard {
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import Dashboard from './Dashboard';
|
||||
|
||||
it('renders without crashing', () => {
|
||||
const div = document.createElement('div');
|
||||
ReactDOM.render(<Dashboard />, div);
|
||||
ReactDOM.unmountComponentAtNode(div);
|
||||
});
|
||||
@ -0,0 +1,40 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import './Dashboard.css';
|
||||
|
||||
declare const window: any;
|
||||
|
||||
class Dashboard extends Component {
|
||||
constructor(props: any) {
|
||||
super(props);
|
||||
}
|
||||
componentWillMount() {
|
||||
window.cvat.server.login('admin', 'admin').then(
|
||||
(response: any) => {
|
||||
console.log(response);
|
||||
},
|
||||
(error: any) => {
|
||||
console.log(error);
|
||||
}
|
||||
);
|
||||
|
||||
window.cvat.tasks.get().then(
|
||||
(response: any) => {
|
||||
console.log(response);
|
||||
},
|
||||
(error: any) => {
|
||||
console.log(error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
return(
|
||||
<div className="Dashboard">
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Dashboard;
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue