diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.jsx
index 15b5db3475..91e8981f82 100644
--- a/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.jsx
+++ b/awx/ui_next/src/screens/Inventory/InventoryGroupHosts/InventoryGroupHostList.jsx
@@ -25,7 +25,7 @@ import DisassociateButton from '../../../components/DisassociateButton';
import { Kebabified } from '../../../contexts/Kebabified';
import AdHocCommands from '../../../components/AdHocCommands/AdHocCommands';
import InventoryGroupHostListItem from './InventoryGroupHostListItem';
-import AddHostDropdown from '../shared/AddDropdown';
+import AddDropdown from '../shared/AddDropdown';
const QS_CONFIG = getQSConfig('host', {
page: 1,
@@ -185,7 +185,7 @@ function InventoryGroupHostList({ i18n }) {
);
}
- // const addButton = ;
+ const addButton = ;
return (
<>
setIsModalOpen(true)}
- onAddNew={() => history.push(addFormUrl)}
- newTitle={i18n._(t`Add new host`)}
- existingTitle={i18n._(t`Add existing host`)}
- label={i18n._(t`host`)}
- />,
- ]
- : []),
+ ...(canAdd ? [addButton] : []),
{({ isKebabified }) =>
isKebabified ? (
@@ -299,18 +288,7 @@ function InventoryGroupHostList({ i18n }) {
onSelect={() => handleSelect(o)}
/>
)}
- emptyStateControls={
- canAdd && (
- setIsModalOpen(true)}
- onAddNew={() => history.push(addFormUrl)}
- newTitle={i18n._(t`Add new host`)}
- existingTitle={i18n._(t`Add existing host`)}
- label={i18n._(t`host`)}
- />
- )
- }
+ emptyStateControls={canAdd && addButton}
/>
{isModalOpen && (
{({ isKebabified }) =>
isKebabified ? (
-
)}
-
+
) : (
-
)}
-
+
)