File API Bugfix

This commit is contained in:
Celine
2021-01-09 23:34:45 +01:00
parent 4fa8c7bf80
commit 9d52ec1832
5 changed files with 1796 additions and 3078 deletions

View File

File diff suppressed because it is too large Load Diff

View File

@@ -9,10 +9,11 @@
"react-dom": "^16.13.1",
"react-draft-wysiwyg": "^1.14.5",
"react-router-dom": "^5.2.0",
"react-scripts": "^3.4.1"
"react-scripts": "^3.4.4"
},
"scripts": {
"build": "webpack --mode production && mv dist/main.js ../js/files.min.js"
"build": "webpack --mode production && mv dist/main.js ../js/files.min.js",
"debug": "react-scripts start"
},
"eslintConfig": {
"extends": "react-app"
@@ -29,13 +30,12 @@
"last 1 safari version"
]
},
"proxy": "http://localhost",
"devDependencies": {
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"@babel/preset-react": "^7.10.1",
"babel-loader": "^8.1.0",
"babel-polyfill": "^6.26.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
"babel-polyfill": "^6.26.0"
}
}

View File

@@ -1,6 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import API from "../../adminPanel/src/api";
import API from "./api";
class FileControlPanel extends React.Component {
@@ -14,7 +16,7 @@ class FileControlPanel extends React.Component {
render() {
if (!this.state.loadend) {
if (!this.state.loaded) {
this.api.fetchUser().then(() => {
this.setState({ ...this.state, loaded: true });
});