From a42378a64cc4db5fb9f2944fb61dcb1d0659761e Mon Sep 17 00:00:00 2001 From: noorhatoom <155294912+noorhatoom@users.noreply.github.com> Date: Tue, 5 May 2026 12:59:34 +0300 Subject: [PATCH] Remove unused pageLoaded state and related logic in Wizard component --- .../SidebarRight/AddPipeline/Wizard.jsx | 93 ++++++++----------- 1 file changed, 41 insertions(+), 52 deletions(-) diff --git a/src/Routes/SidebarRight/AddPipeline/Wizard.jsx b/src/Routes/SidebarRight/AddPipeline/Wizard.jsx index 123d8dacb..e4c7f8f5f 100644 --- a/src/Routes/SidebarRight/AddPipeline/Wizard.jsx +++ b/src/Routes/SidebarRight/AddPipeline/Wizard.jsx @@ -91,7 +91,6 @@ const Wizard = ({ const [isStreamingPipeline, setIsStreamingPipeline] = useState( initialState.kind === 'stream' ); - const [pageLoaded, setPageLoaded] = useState(false); const [initStepNames] = useState( isRunPipeline ? RunPipelineStepNames : stepNames ); @@ -158,14 +157,6 @@ const Wizard = ({ if (!currentKind) { resetKind(undefined); } - - // Ensure valuesState is synchronized with initial form state - const currentFormValues = form.getFieldsValue(); - if (currentFormValues && Object.keys(currentFormValues).length > 0) { - setValuesState(currentFormValues); - } - - setPageLoaded(true); }, []); useLayoutEffect(() => { @@ -235,50 +226,48 @@ const Wizard = ({ - {pageLoaded && ( - - setReloadGraphPreview(!reloadGraphPreview)} - orientation="vertical" - style={{ boxShadow: '0 0 10px rgba(0, 0, 0, 0.1)' }}> - - - {valuesState && - valuesState.nodes && - valuesState.nodes.length > 0 ? ( - - ) : ( - - {!valuesState - ? 'Loading pipeline data...' - : !valuesState.nodes - ? 'No nodes defined...' - : 'Waiting for pipeline data...'} - - )} - - - - - - Text editor - - + setReloadGraphPreview(!reloadGraphPreview)} + orientation="vertical" + style={{ boxShadow: '0 0 10px rgba(0, 0, 0, 0.1)' }}> + + + {valuesState && + valuesState.nodes && + valuesState.nodes.length > 0 ? ( + - - - - - )} + ) : ( + + {!valuesState + ? 'Loading pipeline data...' + : !valuesState.nodes + ? 'No nodes defined...' + : 'Waiting for pipeline data...'} + + )} + + + + + + Text editor + + + + + +