refactor(multi-server): delete server only if the server doesn't have associated services

This commit is contained in:
Mauricio Siu
2024-09-22 11:56:31 -06:00
parent f7e43fa1c1
commit 1a877340d3
11 changed files with 157 additions and 37 deletions

View File

@@ -11,10 +11,11 @@ import {
} from "@/components/ui/alert-dialog";
interface Props {
title?: string;
description?: string;
title?: string | React.ReactNode;
description?: string | React.ReactNode;
onClick: () => void;
children?: React.ReactNode;
disabled?: boolean;
}
export const DialogAction = ({
@@ -22,6 +23,7 @@ export const DialogAction = ({
children,
description,
title,
disabled,
}: Props) => {
return (
<AlertDialog>
@@ -37,7 +39,9 @@ export const DialogAction = ({
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction onClick={onClick}>Confirm</AlertDialogAction>
<AlertDialogAction disabled={disabled} onClick={onClick}>
Confirm
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>