Skip to content

Commit 91faeec

Browse files
committed
refactor(ui): simplify ConfirmDialog dialogError prop
1 parent c88f3aa commit 91faeec

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/(app)/projects/[projectId]/skills/skills-installed-tab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ export function SkillsInstalledTab(
571571
confirmDisabled={isPending}
572572
confirmLabel="Delete"
573573
description="This action cannot be undone."
574-
{...(confirmError ? { dialogError: confirmError } : {})}
574+
dialogError={confirmError ?? undefined}
575575
onConfirm={confirmDelete}
576576
onOpenChange={(open) => {
577577
if (!open) {

src/components/ui/confirm-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export type ConfirmDialogProps = Readonly<{
4040
* This is useful when an async {@link ConfirmDialogProps.onConfirm} fails and
4141
* the dialog should remain open while showing an actionable error to the user.
4242
*/
43-
dialogError?: string;
43+
dialogError?: string | undefined;
4444
/**
4545
* Confirm button label.
4646
*

0 commit comments

Comments
 (0)