new features context to render features correctly on change

This commit is contained in:
2021-09-20 12:20:22 +02:00
parent f17bac399a
commit e71f262b79
10 changed files with 67 additions and 83 deletions

View File

@ -1,4 +1,3 @@
import GlobalInfos from './GlobalInfos';
import {cookie} from './context/Cookie';
const APIPREFIX: string = '/api/';
@ -84,13 +83,7 @@ function generalAPICall<T>(
}
} else if (response.status === 400) {
// Bad Request --> invalid token
console.log('loading Password page.');
// load password page
if (GlobalInfos.loadPasswordPage) {
GlobalInfos.loadPasswordPage(() => {
callAPI(apinode, fd, callback, errorcallback);
});
}
console.log('bad request todo sth here');
} else {
console.log('Error: ' + response.statusText);
if (errorcallback) {