diff --git a/src/views/migrationpolicies/list/MigrationPoliciesList.tsx b/src/views/migrationpolicies/list/MigrationPoliciesList.tsx index ce2f22482..9dcbf7fb9 100644 --- a/src/views/migrationpolicies/list/MigrationPoliciesList.tsx +++ b/src/views/migrationpolicies/list/MigrationPoliciesList.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { FC } from 'react'; import { V1alpha1MigrationPolicy } from '@kubevirt-ui/kubevirt-api/kubevirt'; import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation'; @@ -21,7 +21,7 @@ type MigrationPoliciesListProps = { kind: string; }; -const MigrationPoliciesList: React.FC = ({ kind }) => { +const MigrationPoliciesList: FC = ({ kind }) => { const { t } = useKubevirtTranslation(); const [mps, loaded, loadError] = useK8sWatchResource({ isList: true, @@ -54,10 +54,11 @@ const MigrationPoliciesList: React.FC = ({ kind }) = loaded={loaded} onFilterChange={onFilterChange} /> + {isEmpty(mps) && } columns={activeColumns} data={data} - EmptyMsg={() => } + EmptyMsg={() => <>} loaded={loaded} loadError={loadError} Row={MigrationPoliciesRow} diff --git a/src/views/virtualmachines/list/VirtualMachinesList.tsx b/src/views/virtualmachines/list/VirtualMachinesList.tsx index 33db133a0..bb103a42e 100644 --- a/src/views/virtualmachines/list/VirtualMachinesList.tsx +++ b/src/views/virtualmachines/list/VirtualMachinesList.tsx @@ -181,10 +181,8 @@ const VirtualMachinesList: FC = ({ kind, namespace }) /> )} + {isEmpty(vms) && } - NoDataEmptyMsg={() => ( - - )} rowData={{ getVmi: (ns: string, name: string) => vmiMapper?.mapper?.[ns]?.[name], getVmim: (ns: string, name: string) => vmimMapper?.[ns]?.[name], @@ -195,6 +193,7 @@ const VirtualMachinesList: FC = ({ kind, namespace }) data={data} loaded={loaded && vmiLoaded && vmimsLoaded && isSingleNodeLoaded && !loadingFeatureProxy} loadError={loadError} + NoDataEmptyMsg={() => <>} Row={VirtualMachineRow} unfilteredData={unfilteredData} />