Web: Doceditor: fixed loading mf components

This commit is contained in:
Artem Tarasov 2022-03-30 11:47:06 +03:00
parent 1195dc74ca
commit 923c4b0bc2

View File

@ -22,11 +22,18 @@ function useMfScripts() {
React.useEffect(async () => {
if (filesReady && studioReady) {
const [toastr, filesUtils, SharingDialog] = await Promise.all([
loadComponent(STUDIO_SCOPE, "./toastr")(),
loadComponent(FILES_SCOPE, "./utils")(),
loadComponent(FILES_SCOPE, "./SharingDialog")(),
]);
// const [toastr, filesUtils, SharingDialog] = await Promise.all([
// loadComponent(STUDIO_SCOPE, "./toastr")(),
// loadComponent(FILES_SCOPE, "./utils")(),
// loadComponent(FILES_SCOPE, "./SharingDialog")(),
// ]);
const toastr = await loadComponent(STUDIO_SCOPE, "./toastr")();
const SharingDialog = await loadComponent(
FILES_SCOPE,
"./SharingDialog"
)();
const filesUtils = await loadComponent(FILES_SCOPE, "./utils")();
window.toastr = toastr.default;
window.filesUtils = filesUtils;