diff --git a/components/Blocks/Block.tsx b/components/Blocks/Block.tsx
index 67f62860..5558ec35 100644
--- a/components/Blocks/Block.tsx
+++ b/components/Blocks/Block.tsx
@@ -37,6 +37,7 @@ import { DeleteTiny } from "components/Icons/DeleteTiny";
import { ArrowDownTiny } from "components/Icons/ArrowDownTiny";
import { Separator } from "components/Layout";
import { moveBlockUp, moveBlockDown } from "src/utils/moveBlock";
+import { deleteBlock } from "src/utils/deleteBlock";
export type Block = {
factID: string;
@@ -395,6 +396,8 @@ export const BlockLayout = (props: {
hasBackground?: "accent" | "page";
borderOnHover?: boolean;
hasAlignment?: boolean;
+ areYouSure?: boolean;
+ setAreYouSure?: (value: boolean) => void;
}) => {
// this is used to wrap non-text blocks in consistent selected styling, spacing, and top level options like delete
return (
@@ -417,12 +420,23 @@ export const BlockLayout = (props: {
>
{props.children}
- {props.isSelected && }
+ {props.isSelected && (
+
+ )}
);
};
-const NonTextBlockOptions = (props: { isCanvas?: boolean }) => {
+let debounced: null | number = null;
+
+const NonTextBlockOptions = (props: {
+ isCanvas?: boolean;
+ areYouSure?: boolean;
+ setAreYouSure?: (value: boolean) => void;
+}) => {
let { rep } = useReplicache();
let entity_set = useEntitySetContext();
let focusedEntity = useUIState((s) => s.focusedEntity);
@@ -443,7 +457,9 @@ const NonTextBlockOptions = (props: { isCanvas?: boolean }) => {
{focusedEntityType?.data.value !== "canvas" && (
<>