[Security Solution] [Endpoint] Display backbutton for artifact empty states (#122238)

* Display backbutton for empty states

* Remove eui spacer when empty state
This commit is contained in:
David Sánchez 2022-01-04 15:47:35 +01:00 committed by GitHub
parent 75ea37b32d
commit a08da2e9ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,9 +63,15 @@ export const AdministrationListPage: FC<AdministrationListPageProps & CommonProp
const getTestId = useTestIdGenerator(otherProps['data-test-subj']);
return (
<div {...otherProps}>
{!hideHeader && (
const pageHeader = useMemo(
() =>
hideHeader ? (
<EuiFlexGroup direction="column" gutterSize="none" alignItems="flexStart">
<EuiFlexItem grow={false}>
{headerBackComponent && <>{headerBackComponent}</>}
</EuiFlexItem>
</EuiFlexGroup>
) : (
<>
<EuiPageHeader
pageTitle={header}
@ -77,7 +83,22 @@ export const AdministrationListPage: FC<AdministrationListPageProps & CommonProp
/>
<EuiSpacer size="l" />
</>
)}
),
[
actions,
description,
getTestId,
hasBottomBorder,
header,
headerBackComponent,
hideHeader,
restrictWidth,
]
);
return (
<div {...otherProps}>
{pageHeader}
<EuiPageContent
hasBorder={false}