show affected blocks in confirmation dialog when deleting blocks or parameters (#4519)

This commit is contained in:
Celal Zamanoglu
2026-01-23 00:33:18 +03:00
committed by GitHub
parent e7402026f0
commit 4648f2f35b
10 changed files with 543 additions and 325 deletions

View File

@@ -1,16 +0,0 @@
import { BlockActionContext } from "@/store/BlockActionContext";
import { useContext } from "react";
function useDeleteNodeCallback() {
const deleteNodeCallback = useContext(BlockActionContext)?.deleteNodeCallback;
if (!deleteNodeCallback) {
throw new Error(
"useDeleteNodeCallback must be used within a BlockActionContextProvider",
);
}
return deleteNodeCallback;
}
export { useDeleteNodeCallback };

View File

@@ -0,0 +1,17 @@
import { BlockActionContext } from "@/store/BlockActionContext";
import { useContext } from "react";
function useRequestDeleteNodeCallback() {
const requestDeleteNodeCallback =
useContext(BlockActionContext)?.requestDeleteNodeCallback;
if (!requestDeleteNodeCallback) {
throw new Error(
"useRequestDeleteNodeCallback must be used within a BlockActionContextProvider",
);
}
return requestDeleteNodeCallback;
}
export { useRequestDeleteNodeCallback };