web-base/fileControlPanel/src/index.js

38 lines
650 B
JavaScript
Raw Normal View History

2021-01-07 20:47:43 +01:00
import React from 'react';
import ReactDOM from 'react-dom';
2021-01-09 23:34:45 +01:00
import API from "./api";
2021-01-07 20:47:43 +01:00
class FileControlPanel extends React.Component {
constructor(props) {
super(props);
this.api = new API();
this.state = {
loaded: false
};
}
render() {
2021-01-07 22:01:56 +01:00
2021-01-09 23:34:45 +01:00
if (!this.state.loaded) {
2021-01-07 22:01:56 +01:00
this.api.fetchUser().then(() => {
this.setState({ ...this.state, loaded: true });
});
} else if (this.state.user.loggedIn) {
} else {
}
2021-01-07 20:47:43 +01:00
return <></>;
}
}
ReactDOM.render(
<FileControlPanel />,
document.getElementById('root')
);