Skip to content

Commit

Permalink
Hide disabled kebab for connections owned by DSC (#3642)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashley-o0o authored Jan 14, 2025
1 parent 95d2b64 commit 960b099
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions frontend/src/pages/connectionTypes/ConnectionTypesTableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,27 @@ const ConnectionTypesTableRow: React.FC<ConnectionTypesTableRowProps> = ({
title: 'Preview',
onClick: () => setShowPreview(true),
},
{
title: 'Edit',
onClick: () => navigate(`/connectionTypes/edit/${obj.metadata.name}`),
isDisabled: ownedByDSC(obj),
},
...(!ownedByDSC(obj)
? [
{
title: 'Edit',
onClick: () => navigate(`/connectionTypes/edit/${obj.metadata.name}`),
},
]
: []),
{
title: 'Duplicate',
onClick: () => navigate(`/connectionTypes/duplicate/${obj.metadata.name}`),
},
{ isSeparator: true },
{
title: 'Delete',
onClick: () => handleDelete(obj),
isDisabled: ownedByDSC(obj),
},
...(!ownedByDSC(obj)
? [
{ isSeparator: true },
{
title: 'Delete',
onClick: () => handleDelete(obj),
},
]
: []),
]}
/>
</Td>
Expand Down

0 comments on commit 960b099

Please sign in to comment.