Skip to content

Commit

Permalink
fix(app): fix never clicking setup tab after the run has started (#16072
Browse files Browse the repository at this point in the history
)

Closes RQA-3065 and RQA-3059
  • Loading branch information
mjhuff authored Aug 20, 2024
1 parent a708389 commit ba8692a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/pages/Devices/ProtocolRunDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<RoundTab
Expand Down

0 comments on commit ba8692a

Please sign in to comment.