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