Add API configuration

This commit is contained in:
Eric NGUYEN 2022-10-13 16:27:32 +02:00
parent 7a81bbaec6
commit e97720bc24
9 changed files with 23 additions and 4 deletions

View file

@ -6,6 +6,7 @@ import { LoadState } from './Load';
import { DISABLE_API, GetDefaultEditorState } from '../../../utils/default';
export function NewEditor(
editorState: IEditorState,
setEditorState: Dispatch<SetStateAction<IEditorState>>,
setLoaded: Dispatch<SetStateAction<boolean>>
): void {
@ -14,6 +15,10 @@ export function NewEditor(
return;
}
if (editorState.configuration !== undefined) {
return;
}
// Fetch the configuration from the API
FetchConfiguration()
.then((configuration: IConfiguration) => {