Fix: Remove delete button from the list-view instead of disabling it

This commit is contained in:
Gustav Hansen 2023-07-20 12:58:17 +02:00
parent c3e1892955
commit cae957a571

View File

@ -342,6 +342,7 @@ export function ReviewWorkflowsListView() {
<Pencil />
</ActionLink>
{workflows.length > 1 && canDelete && (
<IconButton
aria-label={formatMessage(
{
@ -350,13 +351,13 @@ export function ReviewWorkflowsListView() {
},
{ name: 'Default workflow' }
)}
disabled={workflows.length === 1 || !canDelete}
icon={<Trash />}
noBorder
onClick={() => {
handleDeleteWorkflow(workflow.id);
}}
/>
)}
</Flex>
</Td>
</Tr>