Web:Client:Rename props in isEmptyPage

This commit is contained in:
Vlada Gazizova 2022-09-19 14:16:47 +03:00
parent 9480cc9d52
commit a0b3240aea

View File

@ -63,15 +63,18 @@ const RootFolderContainer = (props) => {
]; ];
const [showLoader, setShowLoader] = React.useState(false); const [showLoader, setShowLoader] = React.useState(false);
const [applyRootStyles, setApplyRootStyles] = React.useState(false); const [isEmptyPage, setIsEmptyPage] = React.useState(false);
React.useEffect(() => { React.useEffect(() => {
if (rootFolderType === 20) { if (
setApplyRootStyles(true); rootFolderType !== FolderType.USER &&
rootFolderType !== FolderType.COMMON
) {
setIsEmptyPage(true);
} else { } else {
setApplyRootStyles(false); setIsEmptyPage(false);
} }
}, [rootFolderType, setApplyRootStyles]); }, [isEmptyPage, setIsEmptyPage]);
const onGoToMyDocuments = () => { const onGoToMyDocuments = () => {
const newFilter = filter.clone(); const newFilter = filter.clone();
@ -314,7 +317,7 @@ const RootFolderContainer = (props) => {
) : ( ) : (
<EmptyContainer <EmptyContainer
headerText={headerText} headerText={headerText}
isRootStyles={applyRootStyles} isEmptyPage={isEmptyPage}
{...subheadingTextProp} {...subheadingTextProp}
{...emptyFolderProps} {...emptyFolderProps}
/> />