From 76fbbecb78d06f8af775a7c2d11ade0b3ca05234 Mon Sep 17 00:00:00 2001 From: Jamey Huffnagle Date: Tue, 20 Aug 2024 14:56:38 -0400 Subject: [PATCH] fix(app): fix never clicking setup tab after the run has started --- app/src/pages/Devices/ProtocolRunDetails/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/pages/Devices/ProtocolRunDetails/index.tsx b/app/src/pages/Devices/ProtocolRunDetails/index.tsx index a08ee28bdfc..4413adb8214 100644 --- a/app/src/pages/Devices/ProtocolRunDetails/index.tsx +++ b/app/src/pages/Devices/ProtocolRunDetails/index.tsx @@ -322,11 +322,12 @@ const SetupTab = (props: SetupTabProps): JSX.Element | null => { 'not_available_for_a_completed_run' )}` + // On the initial render only, navigate to "run preview" if the run has started. React.useEffect(() => { if (runHasStarted && protocolRunDetailsTab === 'setup') { navigate(`/devices/${robotName}/protocol-runs/${runId}/run-preview`) } - }, [runHasStarted, navigate, protocolRunDetailsTab, robotName, runId]) + }, []) return (