diff --git a/app/(manage)/manage/comments/comments-client.tsx b/app/(manage)/manage/comments/comments-client.tsx index 0a71af4..11f9881 100644 --- a/app/(manage)/manage/comments/comments-client.tsx +++ b/app/(manage)/manage/comments/comments-client.tsx @@ -13,6 +13,7 @@ import { ChevronRightIcon, MessageSquareIcon, } from "lucide-react" +import { ConfirmDialog } from "@/components/ui/modal" interface Comment { id: string @@ -419,72 +420,30 @@ export function CommentsClient() { )} {/* Confirmation Dialogs */} - {confirmAction && ( -
-
- {confirmAction.type === "remove" && ( - <> -

- Confirm Remove -

-

- Are you sure you want to remove this comment? -

-
- - -
- - )} + {confirmAction?.type === "remove" && ( + setConfirmAction(null)} + onConfirm={() => handleRemove(confirmAction.comment)} + title="Confirm Remove" + message="Are you sure you want to remove this comment?" + confirmLabel="Remove" + variant="destructive" + loading={actionLoading[confirmAction.comment.id]} + /> + )} - {confirmAction.type === "restore" && ( - <> -

- Confirm Restore -

-

- Are you sure you want to restore this comment? -

-
- - -
- - )} -
-
+ {confirmAction?.type === "restore" && ( + setConfirmAction(null)} + onConfirm={() => handleRestore(confirmAction.comment)} + title="Confirm Restore" + message="Are you sure you want to restore this comment?" + confirmLabel="Restore" + variant="default" + loading={actionLoading[confirmAction.comment.id]} + /> )} )