Confirmation Dialogs

This commit is contained in:
Gregory Schier
2023-03-26 12:02:20 -07:00
parent 11b719955b
commit b2dcc38982
12 changed files with 150 additions and 43 deletions

View File

@@ -34,15 +34,6 @@ export const WorkspaceDropdown = memo(function WorkspaceDropdown({ className }:
return [
...workspaceItems,
{
type: 'separator',
label: activeWorkspace?.name,
},
{
label: 'Delete',
leftSlot: <Icon icon="trash" />,
onSelect: () => deleteWorkspace.mutate(),
},
{
type: 'separator',
label: 'Actions',
@@ -52,6 +43,11 @@ export const WorkspaceDropdown = memo(function WorkspaceDropdown({ className }:
leftSlot: <Icon icon="plus" />,
onSelect: () => createWorkspace.mutate({ name: 'New Workspace' }),
},
{
label: 'Delete Workspace',
leftSlot: <Icon icon="trash" />,
onSelect: () => deleteWorkspace.mutate(),
},
];
}, [workspaces, activeWorkspaceId]);