Skip to content

Commit

Permalink
Move navigate into onSuccess if run hasn't been closed yet
Browse files Browse the repository at this point in the history
  • Loading branch information
smb2268 committed Aug 15, 2024
1 parent 03f5843 commit 46e11b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/pages/RunSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,15 @@ export function RunSummary(): JSX.Element {
const returnToQuickTransfer = (): void => {
if (!isRunCurrent) {
deleteRun(runId)
navigate('/quick-transfer')
} else {
closeCurrentRun({
onSuccess: () => {
deleteRun(runId)
navigate('/quick-transfer')
},
})
}
navigate('/quick-transfer')
}

// TODO(jh, 05-30-24): EXEC-487. Refactor reset() so we can redirect to the setup page, showing the shimmer skeleton instead.
Expand Down

0 comments on commit 46e11b7

Please sign in to comment.