mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Use short circuit operator in favor of ternary conditional
This commit is contained in:
parent
faa0802d97
commit
1b50895738
@ -165,12 +165,12 @@ function InventoryHosts({ i18n, location, match }) {
|
|||||||
itemsToDelete={selected}
|
itemsToDelete={selected}
|
||||||
pluralizedItemName={i18n._(t`Hosts`)}
|
pluralizedItemName={i18n._(t`Hosts`)}
|
||||||
/>,
|
/>,
|
||||||
canAdd ? (
|
canAdd && (
|
||||||
<ToolbarAddButton
|
<ToolbarAddButton
|
||||||
key="add"
|
key="add"
|
||||||
linkTo={`/inventories/inventory/${match.params.id}/hosts/add`}
|
linkTo={`/inventories/inventory/${match.params.id}/hosts/add`}
|
||||||
/>
|
/>
|
||||||
) : null,
|
),
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -186,12 +186,12 @@ function InventoryHosts({ i18n, location, match }) {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
emptyStateControls={
|
emptyStateControls={
|
||||||
canAdd ? (
|
canAdd && (
|
||||||
<ToolbarAddButton
|
<ToolbarAddButton
|
||||||
key="add"
|
key="add"
|
||||||
linkTo={`/inventories/inventory/${match.params.id}/add`}
|
linkTo={`/inventories/inventory/${match.params.id}/add`}
|
||||||
/>
|
/>
|
||||||
) : null
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user