Show a warning in the command palette for deleting a project

This commit is contained in:
Frank Noirot
2024-10-04 16:59:09 -04:00
parent 5bd89047b2
commit 049e487ac4
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import { CommandBarOverwriteWarning } from 'components/CommandBarOverwriteWarning'
import { StateMachineCommandSetConfig } from 'lib/commandTypes'
import { projectsMachine } from 'machines/projectsMachine'
@ -53,6 +54,10 @@ export const projectsCommandBarConfig: StateMachineCommandSetConfig<
icon: 'close',
description: 'Delete a project',
needsReview: true,
reviewMessage: ({ argumentsToSubmit }) => CommandBarOverwriteWarning({
heading: 'Are you sure?',
message: `This will permanently delete the project "${argumentsToSubmit.name}".`,
}),
args: {
name: {
inputType: 'options',