Hide list toolbar if no views
@@ -42,8 +42,9 @@ export const ViewList: React.FunctionComponent<IViewsListProps> = props => {
};
return (
- <>
- <PageSection noPadding={true} variant={'light'}>
+ <PageSection>
+ {props.hasListData ? (
+ <React.Fragment>
<ListViewToolbar {...props}>
<div className="form-group">
<OverlayTrigger overlay={getImportViewsTooltip()} placement="top">
@@ -66,10 +67,8 @@ export const ViewList: React.FunctionComponent<IViewsListProps> = props => {
</OverlayTrigger>
</div>
</ListViewToolbar>
- </PageSection>
- <PageSection noPadding={true} variant={'light'}>
- {props.hasListData ? (
<ListView>{props.children}</ListView>
+ </React.Fragment>
) : (
<EmptyViewsState
i18nEmptyStateTitle={props.i18nEmptyStateTitle}
@@ -83,6 +82,5 @@ export const ViewList: React.FunctionComponent<IViewsListProps> = props => {
/>
)}
</PageSection>
- </>
);
};
