Apply Prettier formatting
This commit is contained in:
parent
696c07991d
commit
b8581581ea
3 changed files with 24 additions and 11 deletions
|
|
@ -174,9 +174,12 @@ export default function Page({
|
||||||
|
|
||||||
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 () => {
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,12 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
||||||
}
|
}
|
||||||
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;
|
||||||
|
|
|
||||||
|
|
@ -1513,6 +1513,11 @@ export function getGroupOutputNodeId(
|
||||||
}
|
}
|
||||||
|
|
||||||
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