Update Blueprints.tsx
This commit is contained in:
@@ -9,7 +9,7 @@ import { useSiteStore } from "../../../store/siteStore";
|
||||
import { useBuilderStore } from "../../../store/builderStore";
|
||||
import { siteBuilderApi } from "../../../services/siteBuilder.api";
|
||||
import type { SiteBlueprint } from "../../../types/siteBuilder";
|
||||
import { Modal } from "../../../components/ui/modal";
|
||||
import AlertModal from "../../../components/ui/alert/AlertModal";
|
||||
|
||||
export default function SiteBuilderBlueprints() {
|
||||
const navigate = useNavigate();
|
||||
@@ -275,33 +275,20 @@ export default function SiteBuilderBlueprints() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<Modal
|
||||
<AlertModal
|
||||
isOpen={deleteConfirm.isOpen}
|
||||
onClose={() => setDeleteConfirm({ isOpen: false, blueprint: null, isBulk: false })}
|
||||
title={deleteConfirm.isBulk ? "Delete Blueprints" : "Delete Blueprint"}
|
||||
description={
|
||||
message={
|
||||
deleteConfirm.isBulk
|
||||
? `Are you sure you want to delete ${selectedIds.size} blueprint${selectedIds.size !== 1 ? 's' : ''}? This will also delete all associated page blueprints. This action cannot be undone.`
|
||||
: `Are you sure you want to delete "${deleteConfirm.blueprint?.name}"? This will also delete all associated page blueprints. This action cannot be undone.`
|
||||
}
|
||||
footer={
|
||||
<>
|
||||
<Button
|
||||
variant="outline"
|
||||
tone="neutral"
|
||||
onClick={() => setDeleteConfirm({ isOpen: false, blueprint: null, isBulk: false })}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
variant="solid"
|
||||
tone="danger"
|
||||
onClick={handleDeleteConfirm}
|
||||
>
|
||||
Delete
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
variant="danger"
|
||||
isConfirmation={true}
|
||||
onConfirm={handleDeleteConfirm}
|
||||
confirmText="Delete"
|
||||
cancelText="Cancel"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user