Coalesce the Validation Block and the new Human Interaction Block (#3882)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { BlockActionContext } from "@/store/BlockActionContext";
|
||||
import { useContext } from "react";
|
||||
|
||||
function useTransmuteNodeCallback() {
|
||||
const transmuteNodeCallback =
|
||||
useContext(BlockActionContext)?.transmuteNodeCallback;
|
||||
|
||||
if (!transmuteNodeCallback) {
|
||||
throw new Error(
|
||||
"useTransmuteNodeCallback must be used within a BlockActionContextProvider",
|
||||
);
|
||||
}
|
||||
|
||||
return transmuteNodeCallback;
|
||||
}
|
||||
|
||||
export { useTransmuteNodeCallback };
|
||||
Reference in New Issue
Block a user