removed console.log and fixed onDeleteBug
This commit is contained in:
parent
25da8d89e6
commit
52df6d9152
2 changed files with 2 additions and 5 deletions
|
|
@ -34,7 +34,6 @@ export default function GenericNode({
|
|||
const { reactFlowInstance } = useContext(typesContext);
|
||||
const [params, setParams] = useState([]);
|
||||
|
||||
console.log();
|
||||
|
||||
useEffect(() => {
|
||||
if (reactFlowInstance) {
|
||||
|
|
@ -53,15 +52,13 @@ export default function GenericNode({
|
|||
body: JSON.stringify(reactFlowInstance.toObject()),
|
||||
});
|
||||
|
||||
console.log(response.status, response.body);
|
||||
|
||||
if (response.status === 200) {
|
||||
setValidationStatus("success");
|
||||
} else if (response.status === 500) {
|
||||
setValidationStatus("error");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error validating node:", error);
|
||||
// console.error("Error validating node:", error);
|
||||
setValidationStatus("error");
|
||||
}
|
||||
}, 1000), // Adjust the debounce delay (500ms) as needed
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ export default function FlowPage({ flow }:{flow:FlowType}) {
|
|||
const onDelete = (mynodes) => {
|
||||
setEdges(
|
||||
edges.filter(
|
||||
(ns) => !nodes.some((n) => ns.source === n.id || ns.target === n.id)
|
||||
(ns) => !mynodes.some((n) => ns.source === n.id || ns.target === n.id)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue