completionId: cgen-48bf4fb2f72949b587ce0f1ee7bfb3b5

cgen-48bf4fb2f72949b587ce0f1ee7bfb3b5
This commit is contained in:
Builder.io 2025-11-11 03:22:17 +00:00
parent 5d6ab7f36a
commit 853bacd9fe

View file

@ -278,6 +278,33 @@ export default function AdminBlogManager() {
)}
</CardContent>
</Card>
{deleteConfirm && (
<AlertDialog open={!!deleteConfirm} onOpenChange={(open) => !open && setDeleteConfirm(null)}>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Delete blog post?</AlertDialogTitle>
<AlertDialogDescription>
Are you sure you want to delete "{deleteConfirm.title}"? This action cannot be undone.
</AlertDialogDescription>
</AlertDialogHeader>
<div className="flex gap-2 justify-end">
<AlertDialogCancel onClick={() => setDeleteConfirm(null)}>
Cancel
</AlertDialogCancel>
<AlertDialogAction
onClick={() => {
handleDeleteBlogPost(deleteConfirm.slug);
setDeleteConfirm(null);
}}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
>
Delete
</AlertDialogAction>
</div>
</AlertDialogContent>
</AlertDialog>
)}
</div>
);
}