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 (