Web: Editor: Fixed displaying of toast.

This commit is contained in:
TatianaLopaeva 2021-03-30 14:03:43 +03:00
parent f6e242f341
commit 1531a37951

View File

@ -1,6 +1,9 @@
import React, { useEffect, useState } from "react";
import Toast from "@appserver/components/toast";
import toastr from "studio/toastr";
import { toast } from "react-toastify";
import Box from "@appserver/components/box";
import { regDesktop } from "@appserver/common/desktop";
import Loaders from "@appserver/common/components/Loaders";
@ -20,8 +23,8 @@ import {
} from "@appserver/common/api/files";
import { checkIsAuthenticated } from "@appserver/common/api/user";
import { getUser } from "@appserver/common/api/people";
import FilesFilter from "@appserver/common/api/files/filter";
import throttle from "lodash/throttle";
import { isIOS, deviceType } from "react-device-detect";
import { homepage } from "../package.json";
@ -54,6 +57,8 @@ let fileInfo;
const url = window.location.href;
const filesUrl = url.substring(0, url.indexOf("/doceditor"));
toast.configure();
const Editor = ({
uploadPanelVisible,
sharingPanelVisible,
@ -364,10 +369,10 @@ const Editor = ({
heightProp={isIPad() ? "calc(var(--vh, 1vh) * 100)" : "100vh"}
>
<Toast />
{!isLoading ? (
<>
<div id="editor"></div>
{sharingPanelVisible && (
<SharingPanel
key="sharing-panel"