Apply Prettier formatting
This commit is contained in:
parent
696c07991d
commit
b8581581ea
3 changed files with 24 additions and 11 deletions
|
|
@ -172,11 +172,14 @@ export default function Page({
|
||||||
}
|
}
|
||||||
}, [currentFlowId, reactFlowInstance]);
|
}, [currentFlowId, reactFlowInstance]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(checkOldComponents({nodes:flow?.data?.nodes ?? []})){
|
if (checkOldComponents({ nodes: flow?.data?.nodes ?? [] })) {
|
||||||
setNoticeData({title:"Components created before Langflow 1.0 may be unstable. Ensure components are up to date."})
|
setNoticeData({
|
||||||
}
|
title:
|
||||||
},[])
|
"Components created before Langflow 1.0 may be unstable. Ensure components are up to date.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return () => {
|
return () => {
|
||||||
|
|
|
||||||
|
|
@ -241,9 +241,14 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(selection.nodes){
|
if (selection.nodes) {
|
||||||
if(checkOldComponents({nodes:selection.nodes ?? []})){
|
if (checkOldComponents({ nodes: selection.nodes ?? [] })) {
|
||||||
useAlertStore.getState().setNoticeData({title:"Components created before Langflow 1.0 may be unstable. Ensure components are up to date."})
|
useAlertStore
|
||||||
|
.getState()
|
||||||
|
.setNoticeData({
|
||||||
|
title:
|
||||||
|
"Components created before Langflow 1.0 may be unstable. Ensure components are up to date.",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let minimumX = Infinity;
|
let minimumX = Infinity;
|
||||||
|
|
|
||||||
|
|
@ -1512,7 +1512,12 @@ export function getGroupOutputNodeId(
|
||||||
return { id: node.id, outputName: p_name };
|
return { id: node.id, outputName: p_name };
|
||||||
}
|
}
|
||||||
|
|
||||||
export function checkOldComponents({nodes}:{nodes:any[]}) {
|
export function checkOldComponents({ nodes }: { nodes: any[] }) {
|
||||||
return nodes.some((node) => node.data.node?.template.code && (node.data.node?.template.code.value as string).includes("(CustomComponent):"));
|
return nodes.some(
|
||||||
|
(node) =>
|
||||||
|
node.data.node?.template.code &&
|
||||||
|
(node.data.node?.template.code.value as string).includes(
|
||||||
|
"(CustomComponent):",
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue