chore: remove legacy component checks and alerts (#4757)

📝 (PageComponent/index.tsx): Remove redundant useEffect hook that sets notice data for old components
📝 (flowStore.ts): Remove unnecessary check for old components in selection nodes in useFlowStore function
This commit is contained in:
Cristhian Zanforlin Lousa 2024-11-21 21:44:44 -03:00 committed by GitHub
commit 76890822b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 17 deletions

View file

@ -181,15 +181,6 @@ export default function Page({ view }: { view?: boolean }): JSX.Element {
Object.keys(types).length > 0 &&
!isFetching;
useEffect(() => {
if (checkOldComponents({ nodes })) {
setNoticeData({
title:
"Components created before Langflow 1.0 may be unstable. Ensure components are up to date.",
});
}
}, [currentFlowId]);
useEffect(() => {
useFlowStore.setState({ autoSaveFlow });
});

View file

@ -347,14 +347,7 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
selection.nodes.some((node) => edge.target === node.id),
);
}
if (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.",
});
}
}
let minimumX = Infinity;
let minimumY = Infinity;
let idsMap = {};