Shared:Components:Selector: Hide bread crumbs on an empty screen

This commit is contained in:
Akmal Isomadinov 2024-07-09 13:31:33 +05:00
parent 0eba3145e5
commit e3451851e4
2 changed files with 8 additions and 2 deletions

View File

@ -361,7 +361,7 @@ const StyledNewEmptyScreen = styled.section`
box-sizing: border-box;
.empty-image {
margin-top: 26px;
margin-top: 64px;
}
.empty-header {

View File

@ -29,6 +29,7 @@ import React from "react";
import InfiniteLoader from "react-window-infinite-loader";
import { FixedSizeList as List } from "react-window";
import { RoomsType } from "../../../enums";
import { Scrollbar } from "../../scrollbar";
import { Text } from "../../text";
@ -195,6 +196,11 @@ const Body = ({
if (descriptionText) listHeight -= BODY_DESCRIPTION_TEXT_HEIGHT;
const isShareForm =
itemsCount === 0 &&
items?.[0]?.isRoomsOnly &&
items?.[0]?.createDefineRoomType === RoomsType.FormRoom;
return (
<StyledBody
ref={bodyRef}
@ -211,7 +217,7 @@ const Body = ({
withHeader={withHeader}
withTabs={withTabs}
>
{withBreadCrumbs ? (
{withBreadCrumbs && !isShareForm ? (
isBreadCrumbsLoading ? (
breadCrumbsLoader
) : (