stuff
This commit is contained in:
@@ -25,7 +25,6 @@ import {
|
||||
import './styles.css';
|
||||
import AssetManager, { getAssetFromVersion, resolveDocumentAssetUrl, createAssetView } from './asset_manager';
|
||||
import useApiError from './hooks/useApiError';
|
||||
import DetailPanel from './detail/DetailPanel';
|
||||
import TagsPanel from './tags/TagsPanel';
|
||||
import CorrespondentsPanel from './correspondents/CorrespondentsPanel';
|
||||
import TagManager from './tag_manager';
|
||||
@@ -5485,12 +5484,14 @@ const DocumentsRoute = () => {
|
||||
parentBreadcrumb,
|
||||
onNavigateParent: parentBreadcrumb ? handleNavigateParent : null,
|
||||
renderSidebarToggle,
|
||||
detailProps: detailPanelProps,
|
||||
});
|
||||
}, [
|
||||
documentsTableProps,
|
||||
parentBreadcrumb,
|
||||
handleNavigateParent,
|
||||
renderSidebarToggle,
|
||||
detailPanelProps,
|
||||
]);
|
||||
|
||||
const previewSurface = useMemo(() => {
|
||||
@@ -5550,16 +5551,13 @@ const DocumentsRoute = () => {
|
||||
);
|
||||
}
|
||||
|
||||
const supportsDetail = Boolean(surface.supportsDetail);
|
||||
const detailCount = detailPanelProps.selectedDocuments?.length || 0;
|
||||
const showDetailPanel = supportsDetail && detailCount > 0;
|
||||
const variant = surface.variant || 'documents';
|
||||
|
||||
const mainContentClass = `main-content main-content--${variant}${
|
||||
showDetailPanel ? ' main-content--has-detail' : ''
|
||||
surface.detail ? ' main-content--has-detail' : ''
|
||||
}`;
|
||||
const bodyClass = `main-content__body main-content__body--${variant}${
|
||||
showDetailPanel ? ' main-content__body--has-detail' : ''
|
||||
surface.detail ? ' main-content__body--has-detail' : ''
|
||||
}`;
|
||||
|
||||
const header = surface.header || null;
|
||||
@@ -5586,7 +5584,7 @@ const DocumentsRoute = () => {
|
||||
</div>
|
||||
) : null}
|
||||
<div className={bodyClass}>{surface.content}</div>
|
||||
{showDetailPanel ? <DetailPanel {...detailPanelProps} /> : null}
|
||||
{surface.detail || null}
|
||||
</div>
|
||||
</DocumentsLayout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user