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