Skip to content

Commit 1e5ee48

Browse files
authored
Merge pull request #3742 from illume/menu-fix
frontend: ClusterContextMenu: Fix menu to not show two deletes
2 parents 832dd79 + cedf9ed commit 1e5ee48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/components/App/Home/ClusterContextMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ export default function ClusterContextMenu({ cluster }: ClusterContextMenuProps)
153153
>
154154
<ListItemText>{t('translation|Settings')}</ListItemText>
155155
</MenuItem>
156-
{helpers.isElectron() &&
156+
{(!menuItems || menuItems.length === 0) &&
157+
helpers.isElectron() &&
157158
(cluster.meta_data?.source === 'dynamic_cluster' ||
158159
cluster.meta_data?.source === 'kubeconfig') && (
159160
<MenuItem
@@ -165,7 +166,6 @@ export default function ClusterContextMenu({ cluster }: ClusterContextMenuProps)
165166
<ListItemText>{t('translation|Delete')}</ListItemText>
166167
</MenuItem>
167168
)}
168-
169169
{menuItems.map((Item, index) => {
170170
return (
171171
<Item

0 commit comments

Comments
 (0)