From a0b3240aea42bbe953c1551d288f4795d53cd67e Mon Sep 17 00:00:00 2001 From: gazizova-vlada Date: Mon, 19 Sep 2022 14:16:47 +0300 Subject: [PATCH] Web:Client:Rename props in isEmptyPage --- .../EmptyContainer/RootFolderContainer.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/client/src/components/EmptyContainer/RootFolderContainer.js b/packages/client/src/components/EmptyContainer/RootFolderContainer.js index 356876ebdc..bd19fd89a1 100644 --- a/packages/client/src/components/EmptyContainer/RootFolderContainer.js +++ b/packages/client/src/components/EmptyContainer/RootFolderContainer.js @@ -63,15 +63,18 @@ const RootFolderContainer = (props) => { ]; const [showLoader, setShowLoader] = React.useState(false); - const [applyRootStyles, setApplyRootStyles] = React.useState(false); + const [isEmptyPage, setIsEmptyPage] = React.useState(false); React.useEffect(() => { - if (rootFolderType === 20) { - setApplyRootStyles(true); + if ( + rootFolderType !== FolderType.USER && + rootFolderType !== FolderType.COMMON + ) { + setIsEmptyPage(true); } else { - setApplyRootStyles(false); + setIsEmptyPage(false); } - }, [rootFolderType, setApplyRootStyles]); + }, [isEmptyPage, setIsEmptyPage]); const onGoToMyDocuments = () => { const newFilter = filter.clone(); @@ -314,7 +317,7 @@ const RootFolderContainer = (props) => { ) : (